Commit c846dbf8 authored by Zufu Liu's avatar Zufu Liu

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
parent fb325daa
...@@ -189,7 +189,7 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} ...@@ -189,7 +189,7 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
set(id_platform ${CMAKE_VS_PLATFORM_NAME}) set(id_platform ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}") set(id_lang "${lang}")
set(id_PostBuildEvent_Command "") 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") set(id_cl_var "ClangClExecutable")
elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*") elseif(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
set(id_cl clang.exe) set(id_cl clang.exe)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment