cmake: don't set LLVM_COMPILER_IS_GCC_COMPATIBLE when using clang-cl
authorHans Wennborg <hans@hanshq.net>
Mon, 7 Oct 2013 22:03:23 +0000 (22:03 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 7 Oct 2013 22:03:23 +0000 (22:03 +0000)
Tip-of-tree CMake has become clang-cl aware [1]. In this case,
CMAKE_CXX_COMPILER_ID will still be Clang, but MSVC will be true.

[1] See http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d8356d4

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192139 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/HandleLLVMOptions.cmake

index 4d56438..2cec270 100644 (file)
@@ -8,6 +8,8 @@ include(CheckCXXCompilerFlag)
 
 if( CMAKE_COMPILER_IS_GNUCXX )
   set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
+elseif( MSVC )
+  set(LLVM_COMPILER_IS_GCC_COMPATIBLE OFF)
 elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
   set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
 endif()