CMakeParseImplicitIncludeInfo: Remove all CR chars from compiler output

With Clang/LLVM on MinGW, lines ending in `\r\r\n` have been observed.
Filter out all `\r` characters from these line endings.

Fixes: #20021
This commit is contained in:
Brad King
2019-11-25 13:54:21 -05:00
parent 2a5e5b25ba
commit 4b46523d90

View File

@@ -167,7 +167,7 @@ function(cmake_parse_implicit_include_info text lang dir_var log_var state_var)
set(log "")
# go through each line of output...
string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")
string(REGEX REPLACE "\r*\n" ";" output_lines "${text}")
foreach(line IN LISTS output_lines)
if(state STREQUAL start)
string(FIND "${line}" "#include \"...\" search starts here:" rv)