cmake: modules: extension: Fix dts file watch
Fixes an issue in the code that processes the output file of a compiler to see which files should be watched, the compiler can combine multiple files into a single line instead of putting them each on separate lines if the length of the file paths is short, therefore account for this and split it up into multiple elements Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
be96512d82
commit
f4cfb8cd96
1 changed files with 4 additions and 0 deletions
|
@ -2352,6 +2352,10 @@ function(toolchain_parse_make_rule input_file include_files)
|
|||
# the element separator, so let's get the pure `;` back.
|
||||
string(REPLACE "\;" ";" input_as_list ${input})
|
||||
|
||||
# The file might also contain multiple files on one line if one or both of
|
||||
# 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
|
||||
list(POP_FRONT input_as_list first_input_line)
|
||||
string(FIND ${first_input_line} ": " index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue