diff options
author | Fraser Hutchison <fraser.hutchison@maidsafe.net> | 2014-11-19 09:21:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-19 21:24:54 (GMT) |
commit | 4d52cd36ada014bc3e9a65be06b30966cf29f9a8 (patch) | |
tree | 201d12849d117b94db5c81b316ca1f36e7f899cd /Modules/CMakeFindBinUtils.cmake | |
parent | f7b6f3d967b9bebc720ba981bb0f4d8b706bc74c (diff) | |
download | CMake-4d52cd36ada014bc3e9a65be06b30966cf29f9a8.zip CMake-4d52cd36ada014bc3e9a65be06b30966cf29f9a8.tar.gz CMake-4d52cd36ada014bc3e9a65be06b30966cf29f9a8.tar.bz2 |
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.
Diffstat (limited to 'Modules/CMakeFindBinUtils.cmake')
-rw-r--r-- | Modules/CMakeFindBinUtils.cmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake index 50cb972..376a6dc 100644 --- a/Modules/CMakeFindBinUtils.cmake +++ b/Modules/CMakeFindBinUtils.cmake @@ -30,11 +30,11 @@ # License text for the above reference.) # if it's the MS C/CXX compiler, search for link -if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC" - OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC" - OR CMAKE_Fortran_SIMULATE_ID STREQUAL "MSVC" - OR CMAKE_C_COMPILER_ID STREQUAL "MSVC" - OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" +if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" + OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" + OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC" + OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" + OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" OR (CMAKE_GENERATOR MATCHES "Visual Studio" AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")) |