Merge topic 'clang-cl-showincludes'

66de0866 Ninja: Fix clang-cl /showIncludes prefix detection
This commit is contained in:
Brad King 2016-05-04 10:08:38 -04:00 committed by CMake Topic Stage
commit ac714a3839
1 changed files with 2 additions and 2 deletions

View File

@ -664,8 +664,8 @@ function(CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX lang)
ERROR_VARIABLE err ERROR_VARIABLE err
RESULT_VARIABLE res RESULT_VARIABLE res
) )
if(res EQUAL 0 AND "${out}" MATCHES "\n([^:]*:[^:]*:[ \t]*)") if(res EQUAL 0 AND "${out}" MATCHES "(^|\n)([^:\n]*:[^:\n]*:[ \t]*)")
set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_MATCH_1}" PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_MATCH_2}" PARENT_SCOPE)
else() else()
set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "" PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "" PARENT_SCOPE)
endif() endif()