Skip to content

Commit

Permalink
cmake: Change the DTS preprocessing work directory
Browse files Browse the repository at this point in the history
Change the DTS preprocessor working directory from the binary
directory to the application directory.

This is done so that the user can specify
-DDTC_OVERLAY_FILE=overlay.dts with a relative path from the
application directory as is possible for CONF_FILE, and as is
reasonably expected to be possible by users.

Signed-off-by: Sebastian Bøe <[email protected]>
  • Loading branch information
SebastianBoe committed Dec 9, 2019
1 parent b413223 commit 3a134c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/dts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ if(SUPPORTS_DTS)
-P
-E # Stop after preprocessing
-MD # Generate a dependency file as a side-effect
-MF ${BOARD}.dts.pre.d
-o ${BOARD}.dts.pre.tmp
-MF ${PROJECT_BINARY_DIR}/${BOARD}.dts.pre.d
-o ${PROJECT_BINARY_DIR}/${BOARD}.dts.pre.tmp
${ZEPHYR_BASE}/misc/empty_file.c
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
RESULT_VARIABLE ret
)
if(NOT "${ret}" STREQUAL "0")
Expand Down

0 comments on commit 3a134c9

Please sign in to comment.