Skip to content

Commit 19a7942

Browse files
committed
[nrf fromlist] cmake: call build_info() when variable content is known
Calling `build_info()` when variable content is known and before calling external tools. This ensures that build_info is updated with known knowledge even if the external tool fails, and thus can help in debugging. Upstream PR #: 107329 Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
1 parent f5c8ea7 commit 19a7942

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

cmake/modules/dts.cmake

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ function(dts_configuration_files)
205205
${EXTRA_DTC_OVERLAY_FILE_AS_LIST}
206206
)
207207
endif()
208+
build_info(devicetree files PATH ${dts_files})
208209

209210
set(i 0)
210211
foreach(dts_file ${dts_files})
@@ -234,6 +235,7 @@ function(dts_configuration_files)
234235

235236
set(DTS_ROOT_BINDINGS ${DTS_ROOT_BINDINGS} PARENT_SCOPE)
236237
endforeach()
238+
build_info(devicetree bindings-dirs PATH ${CACHED_DTS_ROOT_BINDINGS})
237239

238240
# Cache the location of the root bindings so they can be used by
239241
# scripts which use the build directory.
@@ -261,6 +263,7 @@ function(dts_edt_pickle)
261263
else()
262264
set(dts_preprocessor ${CMAKE_C_COMPILER})
263265
endif()
266+
build_info(devicetree include-dirs PATH ${DTS_ROOT_SYSTEM_INCLUDE_DIRS})
264267
zephyr_dt_preprocess(
265268
CPP ${dts_preprocessor}
266269
SOURCE_FILES ${dts_files}
@@ -427,18 +430,11 @@ function(dts_dtc)
427430
endif(DTC)
428431
endfunction()
429432

430-
function(dts_build_info_output)
431-
build_info(devicetree files PATH ${dts_files})
432-
build_info(devicetree include-dirs PATH ${DTS_ROOT_SYSTEM_INCLUDE_DIRS})
433-
build_info(devicetree bindings-dirs PATH ${CACHED_DTS_ROOT_BINDINGS})
434-
endfunction()
435-
436433
macro(dts_init)
437434
dts_configuration_files()
438435
dts_edt_pickle()
439436
dts_gen_defines()
440437
dts_gen_driver_kconfig()
441438
dts_import()
442439
dts_dtc()
443-
dts_build_info_output()
444440
endmacro()

0 commit comments

Comments
 (0)