diff options
author | Brad King <brad.king@kitware.com> | 2014-09-08 13:58:33 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2014-09-11 19:23:24 (GMT) |
commit | 0b12815dc2feeb328a86b77328d13a328368d38b (patch) | |
tree | 96edfb2c3cc952cde49f5033cce285a0ae1f131a /Modules/TestForANSIForScope.cmake | |
parent | 188a1f236e1594fc46163fbad5e062e3978c1e5a (diff) | |
download | CMake-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/TestForANSIForScope.cmake')
-rw-r--r-- | Modules/TestForANSIForScope.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
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 |