Skip to content

Commit

Permalink
[nrf fromtree] cmake: update build_info() calls to use PATH argument
Browse files Browse the repository at this point in the history
Update build_info() calls to use `PATH` argument when values passed to
`build_info()` are user specified and thereby might use native path
separator, such as a single `\`.

Signed-off-by: Torsten Rasmussen <[email protected]>
(cherry picked from commit 2c1eae2)
(cherry picked from commit 18ba09b)
  • Loading branch information
tejlmand authored and github-actions[bot] committed Oct 28, 2024
1 parent 5cacb04 commit 76a3aeb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/FindHostTools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ set(HostTools_FOUND TRUE)
set(HOSTTOOLS_FOUND TRUE)
build_info(toolchain name VALUE ${ZEPHYR_TOOLCHAIN_VARIANT})
string(TOUPPER ${ZEPHYR_TOOLCHAIN_VARIANT} zephyr_toolchain_variant_upper)
build_info(toolchain path VALUE "${${zephyr_toolchain_variant_upper}_TOOLCHAIN_PATH}")
build_info(toolchain path PATH "${${zephyr_toolchain_variant_upper}_TOOLCHAIN_PATH}")
10 changes: 5 additions & 5 deletions cmake/modules/dts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ set(dts_files
if(DTC_OVERLAY_FILE)
zephyr_list(TRANSFORM DTC_OVERLAY_FILE NORMALIZE_PATHS
OUTPUT_VARIABLE DTC_OVERLAY_FILE_AS_LIST)
build_info(devicetree user-files VALUE ${DTC_OVERLAY_FILE_AS_LIST})
build_info(devicetree user-files PATH ${DTC_OVERLAY_FILE_AS_LIST})
list(APPEND
dts_files
${DTC_OVERLAY_FILE_AS_LIST}
Expand All @@ -192,7 +192,7 @@ endif()
if(EXTRA_DTC_OVERLAY_FILE)
zephyr_list(TRANSFORM EXTRA_DTC_OVERLAY_FILE NORMALIZE_PATHS
OUTPUT_VARIABLE EXTRA_DTC_OVERLAY_FILE_AS_LIST)
build_info(devicetree extra-user-files VALUE ${EXTRA_DTC_OVERLAY_FILE_AS_LIST})
build_info(devicetree extra-user-files PATH ${EXTRA_DTC_OVERLAY_FILE_AS_LIST})
list(APPEND
dts_files
${EXTRA_DTC_OVERLAY_FILE_AS_LIST}
Expand Down Expand Up @@ -390,6 +390,6 @@ elseif(stderr)
endif()
endif(DTC)

build_info(devicetree files VALUE ${dts_files})
build_info(devicetree include-dirs VALUE ${DTS_ROOT_SYSTEM_INCLUDE_DIRS})
build_info(devicetree bindings-dirs VALUE ${DTS_ROOT_BINDINGS})
build_info(devicetree files PATH ${dts_files})
build_info(devicetree include-dirs PATH ${DTS_ROOT_SYSTEM_INCLUDE_DIRS})
build_info(devicetree bindings-dirs PATH ${DTS_ROOT_BINDINGS})
6 changes: 3 additions & 3 deletions cmake/modules/kconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ set(PARSED_KCONFIG_SOURCES_TXT ${PROJECT_BINARY_DIR}/kconfig/sources.txt)
if(CONF_FILE)
string(CONFIGURE "${CONF_FILE}" CONF_FILE_EXPANDED)
string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE_EXPANDED}")
build_info(kconfig user-files VALUE ${CONF_FILE_AS_LIST})
build_info(kconfig user-files PATH ${CONF_FILE_AS_LIST})
endif()

if(EXTRA_CONF_FILE)
string(CONFIGURE "${EXTRA_CONF_FILE}" EXTRA_CONF_FILE_EXPANDED)
string(REPLACE " " ";" EXTRA_CONF_FILE_AS_LIST "${EXTRA_CONF_FILE_EXPANDED}")
build_info(kconfig extra-user-files VALUE ${EXTRA_CONF_FILE_AS_LIST})
build_info(kconfig extra-user-files PATH ${EXTRA_CONF_FILE_AS_LIST})
endif()

zephyr_file(CONF_FILES ${BOARD_EXTENSION_DIRS} KCONF board_extension_conf_files SUFFIX ${FILE_SUFFIX})
Expand Down Expand Up @@ -360,7 +360,7 @@ endif()
if(CREATE_NEW_DOTCONFIG)
set(input_configs_flags --handwritten-input-configs)
set(input_configs ${merge_config_files} ${FORCED_CONF_FILE})
build_info(kconfig files VALUE ${input_configs})
build_info(kconfig files PATH ${input_configs})
else()
set(input_configs ${DOTCONFIG} ${FORCED_CONF_FILE})
endif()
Expand Down

0 comments on commit 76a3aeb

Please sign in to comment.