Skip to content

Commit 3a4d547

Browse files
SebastianBoenashif
authored andcommitted
cmake: Change the DTS preprocessing work directory
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]>
1 parent 3dcefbb commit 3a4d547

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/dts.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ if(SUPPORTS_DTS)
126126
-P
127127
-E # Stop after preprocessing
128128
-MD # Generate a dependency file as a side-effect
129-
-MF ${BOARD}.dts.pre.d
130-
-o ${BOARD}.dts.pre.tmp
129+
-MF ${PROJECT_BINARY_DIR}/${BOARD}.dts.pre.d
130+
-o ${PROJECT_BINARY_DIR}/${BOARD}.dts.pre.tmp
131131
${ZEPHYR_BASE}/misc/empty_file.c
132-
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
132+
WORKING_DIRECTORY ${APPLICATION_SOURCE_DIR}
133133
RESULT_VARIABLE ret
134134
)
135135
if(NOT "${ret}" STREQUAL "0")

0 commit comments

Comments
 (0)