summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-08 13:58:33 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2014-09-11 19:23:24 (GMT)
commit0b12815dc2feeb328a86b77328d13a328368d38b (patch)
tree96edfb2c3cc952cde49f5033cce285a0ae1f131a /Modules
parent188a1f236e1594fc46163fbad5e062e3978c1e5a (diff)
downloadCMake-0b12815dc2feeb328a86b77328d13a328368d38b.zip
CMake-0b12815dc2feeb328a86b77328d13a328368d38b.tar.gz
CMake-0b12815dc2feeb328a86b77328d13a328368d38b.tar.bz2
Modules/Test*.cmake: Use if(DEFINED) to simplify conditions
Replace old hacks of the form 'if("${VAR}" MATCHES "^${VAR}$")' with the much simpler 'if(NOT DEFINED ${VAR})'.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/TestBigEndian.cmake2
-rw-r--r--Modules/TestForANSIForScope.cmake2
-rw-r--r--Modules/TestForSSTREAM.cmake2
-rw-r--r--Modules/TestForSTDNamespace.cmake2
4 files changed, 4 insertions, 4 deletions
diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake
index 6f32b08..fcb41ab 100644
--- a/Modules/TestBigEndian.cmake
+++ b/Modules/TestBigEndian.cmake
@@ -25,7 +25,7 @@
# License text for the above reference.)
macro(TEST_BIG_ENDIAN VARIABLE)
- if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+ if(NOT DEFINED HAVE_${VARIABLE})
message(STATUS "Check if the system is big endian")
message(STATUS "Searching 16 bit integer")
diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake
index de4b1f1..78fff9f 100644
--- a/Modules/TestForANSIForScope.cmake
+++ b/Modules/TestForANSIForScope.cmake
@@ -24,7 +24,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-if("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")
+if(NOT DEFINED CMAKE_ANSI_FOR_SCOPE)
message(STATUS "Check for ANSI scope")
try_compile(CMAKE_ANSI_FOR_SCOPE ${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx
diff --git a/Modules/TestForSSTREAM.cmake b/Modules/TestForSSTREAM.cmake
index 8977583..fe18ea2 100644
--- a/Modules/TestForSSTREAM.cmake
+++ b/Modules/TestForSSTREAM.cmake
@@ -23,7 +23,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-if("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$")
+if(NOT DEFINED CMAKE_HAS_ANSI_STRING_STREAM)
message(STATUS "Check for sstream")
try_compile(CMAKE_HAS_ANSI_STRING_STREAM ${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/TestForSSTREAM.cxx
diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake
index e43b75d..0d90774 100644
--- a/Modules/TestForSTDNamespace.cmake
+++ b/Modules/TestForSTDNamespace.cmake
@@ -23,7 +23,7 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-if("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
+if(NOT DEFINED CMAKE_STD_NAMESPACE)
message(STATUS "Check for STD namespace")
try_compile(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx