summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorZufu Liu <zufuliu@gmail.com>2019-05-02 02:45:53 (GMT)
committerZufu Liu <zufuliu@gmail.com>2019-05-02 02:57:37 (GMT)
commitc846dbf89ee5b11a74dceb1c19fd7472eb8b075d (patch)
tree8ed68df8eb89adde6771cc2a93b168a9b2280354 /Modules
parentfb325daa55b1bd6aa2b2b7f2c615214378224938 (diff)
downloadCMake-c846dbf89ee5b11a74dceb1c19fd7472eb8b075d.zip
CMake-c846dbf89ee5b11a74dceb1c19fd7472eb8b075d.tar.gz
CMake-c846dbf89ee5b11a74dceb1c19fd7472eb8b075d.tar.bz2
CMakeDetermineCompilerId: Support versioned LLVM for Visual Studio.
Supports versioned LLVM toolsets like LLVM_v142, LLVM_v141, LLVM_v141_xp, etc. for Visual Studio (2010 and later). The name for versioned LLVM toolsets has "LLVM_" prefix plus MSVC toolset name (i.e. v142, v141, v141_xp, etc.). Fixes: #19203
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index c1c9982..746a806 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -189,7 +189,7 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
set(id_platform ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}")
set(id_PostBuildEvent_Command "")
- if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^[Ll][Ll][Vv][Mm]$")
+ if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "^[Ll][Ll][Vv][Mm](_v[0-9]+(_xp)?)?$")
set(id_cl_var "ClangClExecutable")
elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
set(id_cl clang.exe)