Skip to content

Commit e6c7d81

Browse files
nordicjmanangl
authored andcommitted
[nrf fromlist] cmake: modules: extensions: Fix dts watch file processing
Fixes and simplifies the handling of how the dts watch file is processed Upstream PR: zephyrproject-rtos/zephyr#74655 Signed-off-by: Grzegorz Swiderski <[email protected]> Signed-off-by: Jamie McCrae <[email protected]>
1 parent 9c36c56 commit e6c7d81

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

cmake/modules/extensions.cmake

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2340,16 +2340,8 @@ function(toolchain_parse_make_rule input_file include_files)
23402340
# the file paths are short, split these up into multiple elements using regex
23412341
string(REGEX REPLACE "([^ ])[ ]([^ ])" "\\1;\\2" input_as_list "${input_as_list}")
23422342

2343-
# Pop the first line and treat it specially
2343+
# Pop the first item containing "empty_file.o:"
23442344
list(POP_FRONT input_as_list first_input_line)
2345-
string(FIND ${first_input_line} ": " index)
2346-
math(EXPR j "${index} + 2")
2347-
string(SUBSTRING ${first_input_line} ${j} -1 first_include_file)
2348-
2349-
# Remove whitespace before and after filename and convert to CMake path.
2350-
string(STRIP "${first_include_file}" first_include_file)
2351-
file(TO_CMAKE_PATH "${first_include_file}" first_include_file)
2352-
set(result "${first_include_file}")
23532345

23542346
# Remove whitespace before and after filename and convert to CMake path.
23552347
foreach(file ${input_as_list})

0 commit comments

Comments
 (0)