From 3a134c99e56aaffc027ca8433f3565d2226a9091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Mon, 11 Nov 2019 17:09:06 +0100 Subject: [PATCH] cmake: Change the DTS preprocessing work directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cmake/dts.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/dts.cmake b/cmake/dts.cmake index 29487096e93a4a..7b8c2b13bd83ed 100644 --- a/cmake/dts.cmake +++ b/cmake/dts.cmake @@ -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")