summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFindBinUtils.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-10-14 14:25:32 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2014-10-20 15:49:16 (GMT)
commit29c3edb87adedd82e816552d958f4c3540a1511b (patch)
tree089cea993a6c212b2107554eeca443e48993ca08 /Modules/CMakeFindBinUtils.cmake
parenta7596fef6e8d6938ce0d7fcba47e896f288b12b4 (diff)
downloadCMake-29c3edb87adedd82e816552d958f4c3540a1511b.zip
CMake-29c3edb87adedd82e816552d958f4c3540a1511b.tar.gz
CMake-29c3edb87adedd82e816552d958f4c3540a1511b.tar.bz2
Avoid if() quoted auto-dereference
When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly dereference or quote the variable. We want if() to auto-dereference the variable and not its value. Also replace MATCHES with STREQUAL where equivalent.
Diffstat (limited to 'Modules/CMakeFindBinUtils.cmake')
-rw-r--r--Modules/CMakeFindBinUtils.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index e0ba131..50cb972 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -30,12 +30,12 @@
# 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"
- OR ("${CMAKE_GENERATOR}" MATCHES "Visual Studio"
+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"
+ OR (CMAKE_GENERATOR MATCHES "Visual Studio"
AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android"))
find_program(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION})