summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-07 19:42:51 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-07 19:42:51 (GMT)
commitea574d98edf9ccda5d33ed47f36930f05b45fb0b (patch)
tree5176af10b8cd9468724335d7193918958bc8780c /Modules/CMakeDetermineCompilerId.cmake
parente0c7ccb1b32f9df6510f1dd9b8320be1e3b7babb (diff)
parent8c891f86cc2cbe346d4f6459d01c6d24c27ec2f1 (diff)
downloadCMake-ea574d98edf9ccda5d33ed47f36930f05b45fb0b.zip
CMake-ea574d98edf9ccda5d33ed47f36930f05b45fb0b.tar.gz
CMake-ea574d98edf9ccda5d33ed47f36930f05b45fb0b.tar.bz2
Merge topic 'vs-compiler-id-tolerate-diagnostics'
8c891f8 VS: Tolerate diagnostic output while detecting cl (#14387)
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 8ca5334..da955cb 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -161,7 +161,8 @@ Id flags: ${testflags}
)
# Match the compiler location line printed out.
if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "CMAKE_${lang}_COMPILER=([^%\r\n]+)[\r\n]")
- set(_comp "${CMAKE_MATCH_1}")
+ # Strip VS diagnostic output from the end of the line.
+ string(REGEX REPLACE " \\(TaskId:[0-9]*\\)$" "" _comp "${CMAKE_MATCH_1}")
if(EXISTS "${_comp}")
file(TO_CMAKE_PATH "${_comp}" _comp)
set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE)