Skip to content

Commit b27d3a6

Browse files
nordicjmhenrikbrixandersen
authored andcommitted
cmake: modules: extensions: Fix dts watch file processing
Fixes and simplifies the handling of how the dts watch file is processed Signed-off-by: Grzegorz Swiderski <[email protected]> Signed-off-by: Jamie McCrae <[email protected]> (cherry picked from commit 11c1f3d)
1 parent 388717e commit b27d3a6

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
@@ -2224,16 +2224,8 @@ function(toolchain_parse_make_rule input_file include_files)
22242224
# the file paths are short, split these up into multiple elements using regex
22252225
string(REGEX REPLACE "([^ ])[ ]([^ ])" "\\1;\\2" input_as_list "${input_as_list}")
22262226

2227-
# Pop the first line and treat it specially
2227+
# Pop the first item containing "empty_file.o:"
22282228
list(POP_FRONT input_as_list first_input_line)
2229-
string(FIND ${first_input_line} ": " index)
2230-
math(EXPR j "${index} + 2")
2231-
string(SUBSTRING ${first_input_line} ${j} -1 first_include_file)
2232-
2233-
# Remove whitespace before and after filename and convert to CMake path.
2234-
string(STRIP "${first_include_file}" first_include_file)
2235-
file(TO_CMAKE_PATH "${first_include_file}" first_include_file)
2236-
set(result "${first_include_file}")
22372229

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

0 commit comments

Comments
 (0)