summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRoman Wüger <roman.wueger@gmx.at>2016-09-28 06:46:00 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-28 14:53:10 (GMT)
commit3f300b84f312c340e92ff010c18dfebbeb4edff4 (patch)
tree335342af592238a3dd7b2b43ec5af33820974d88 /Modules
parent1adcf4917e86fadcaf49ed5ad19d9f353febad53 (diff)
downloadCMake-3f300b84f312c340e92ff010c18dfebbeb4edff4.zip
CMake-3f300b84f312c340e92ff010c18dfebbeb4edff4.tar.gz
CMake-3f300b84f312c340e92ff010c18dfebbeb4edff4.tar.bz2
VS: Recognize VS/LLVM toolset names as Clang
Update the toolset name matching added by commit v3.6.0-rc1~279^2~10 (VS: in Clang/C2 toolset, setup correct compiler settings, 2016-02-18) to match VS/LLVM toolset names too.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Windows-MSVC.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 723c69e..8b3b298 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -192,7 +192,7 @@ else()
if(_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM" OR _MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib")
elseif(MSVC_VERSION GREATER 1310)
- if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
+ if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "(v[0-9]+_clang_.*|LLVM-vs[0-9]+.*)")
# Clang/C2 in MSVC14 Update 1 seems to not support -fsantinize (yet?)
# set(_RTC1 "-fsantinize=memory,safe-stack")
set(_FLAGS_CXX " -frtti -fexceptions")
@@ -291,7 +291,7 @@ macro(__windows_compiler_msvc lang)
if("x${lang}" STREQUAL "xC" OR
"x${lang}" STREQUAL "xCXX")
- if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "v[0-9]+_clang_.*")
+ if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "(v[0-9]+_clang_.*|LLVM-vs[0-9]+.*)")
# note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects
# that include MS's own headers. CMake itself is affected project too.
string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}")