cmake: modules: dts: Expose DTS_INCLUDE_FILES

This was previously used as a variable internal to the module, but it
can be used in other places in the build system, which may want a list
of DT-specific includes. Therefore, document it as an output variable.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This commit is contained in:
Grzegorz Swiderski 2024-05-09 12:31:22 +02:00 committed by Johan Hedberg
commit 22fd74914a

View file

@ -57,8 +57,9 @@ find_package(Dtc 1.4.6)
# - ${PROJECT_BINARY_DIR}/zephyr.dts exists # - ${PROJECT_BINARY_DIR}/zephyr.dts exists
# - ${PROJECT_BINARY_DIR}/edt.pickle exists # - ${PROJECT_BINARY_DIR}/edt.pickle exists
# - ${KCONFIG_BINARY_DIR}/Kconfig.dts exists # - ${KCONFIG_BINARY_DIR}/Kconfig.dts exists
# - the build system will be regenerated if any devicetree files # - DTS_INCLUDE_FILES is set to a ;-list of all devicetree files
# used in this build change, including transitive includes # used in this build, including transitive includes (the build
# system will be regenerated if any of those files change)
# - the devicetree extensions in the extensions.cmake module # - the devicetree extensions in the extensions.cmake module
# will be ready for use in other CMake list files that run # will be ready for use in other CMake list files that run
# after this module # after this module
@ -257,14 +258,14 @@ zephyr_dt_preprocess(
# Parse the generated dependency file to find the DT sources that # Parse the generated dependency file to find the DT sources that
# were included, including any transitive includes. # were included, including any transitive includes.
toolchain_parse_make_rule(${DTS_DEPS} toolchain_parse_make_rule(${DTS_DEPS}
include_files # Output parameter DTS_INCLUDE_FILES # Output parameter
) )
# Add the results to the list of files that, when change, force the # Add the results to the list of files that, when change, force the
# build system to re-run CMake. # build system to re-run CMake.
set_property(DIRECTORY APPEND PROPERTY set_property(DIRECTORY APPEND PROPERTY
CMAKE_CONFIGURE_DEPENDS CMAKE_CONFIGURE_DEPENDS
${include_files} ${DTS_INCLUDE_FILES}
${GEN_DEFINES_SCRIPT} ${GEN_DEFINES_SCRIPT}
${GEN_DRIVER_KCONFIG_SCRIPT} ${GEN_DRIVER_KCONFIG_SCRIPT}
${GEN_DTS_CMAKE_SCRIPT} ${GEN_DTS_CMAKE_SCRIPT}