From 4b46523d905451ebdcf0ef8476ebe875945b3a62 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 25 Nov 2019 13:54:21 -0500 Subject: 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 --- Modules/CMakeParseImplicitIncludeInfo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/CMakeParseImplicitIncludeInfo.cmake b/Modules/CMakeParseImplicitIncludeInfo.cmake index 91d03cd..ff4c325 100644 --- a/Modules/CMakeParseImplicitIncludeInfo.cmake +++ b/Modules/CMakeParseImplicitIncludeInfo.cmake @@ -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) -- cgit v0.12