mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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:
committed by
Brad King
parent
f7b6f3d967
commit
4d52cd36ad
@@ -1,6 +1,6 @@
|
||||
include(Compiler/Clang)
|
||||
__compiler_clang(CXX)
|
||||
|
||||
if(NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
||||
if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
endif()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include(Compiler/Clang)
|
||||
__compiler_clang(CXX)
|
||||
|
||||
if(NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
|
||||
if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ if(__COMPILER_CLANG)
|
||||
endif()
|
||||
set(__COMPILER_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")
|
||||
macro(__compiler_clang lang)
|
||||
endmacro()
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user