summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
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 /Tests/CMakeLists.txt
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 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 25cc846..f93ae35 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1501,7 +1501,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
set_tests_properties ( SimpleInstall-Stage2 PROPERTIES DEPENDS SimpleInstall)
# Test static linking on toolchains known to support it.
- if("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU)$"
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU"
AND NOT APPLE AND NOT WIN32 AND NOT CYGWIN
AND EXISTS "/usr/lib/libm.a")
add_test(LinkStatic ${CMAKE_CTEST_COMMAND}