Avoid if() quoted auto-dereference when checking for "MSVC"

When testing CMAKE_<LANG>_COMPILER_ID values against "MSVC", do not
allow the definition of the "MSVC" variable to be expanded.
This commit is contained in:
Fraser Hutchison
2014-11-19 09:21:27 +00:00
committed by Brad King
parent f7b6f3d967
commit 4d52cd36ad
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -18,8 +18,8 @@ if(__WINDOWS_CLANG)
endif()
set(__WINDOWS_CLANG 1)
if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC"
OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
include(Platform/Windows-MSVC)
macro(__windows_compiler_clang lang)
__windows_compiler_msvc(${lang})