Skip to content

Commit

Permalink
cmake: modules: extensions: Fix dts watch file processing
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
nordicjm authored and github-actions[bot] committed Jun 25, 2024
1 parent 00e47ed commit 3dc33b6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions cmake/modules/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2099,16 +2099,8 @@ function(toolchain_parse_make_rule input_file include_files)
# the file paths are short, split these up into multiple elements using regex
string(REGEX REPLACE "([^ ])[ ]([^ ])" "\\1;\\2" input_as_list "${input_as_list}")

# Pop the first line and treat it specially
# Pop the first item containing "empty_file.o:"
list(POP_FRONT input_as_list first_input_line)
string(FIND ${first_input_line} ": " index)
math(EXPR j "${index} + 2")
string(SUBSTRING ${first_input_line} ${j} -1 first_include_file)

# Remove whitespace before and after filename and convert to CMake path.
string(STRIP "${first_include_file}" first_include_file)
file(TO_CMAKE_PATH "${first_include_file}" first_include_file)
set(result "${first_include_file}")

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

0 comments on commit 3dc33b6

Please sign in to comment.