diff options
author | Brad King <brad.king@kitware.com> | 2014-04-15 14:22:34 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-04-15 14:22:34 (GMT) |
commit | 18aaed77c0eb4ea81e02ece5d0be0525e4460828 (patch) | |
tree | b9edac325fd6d09118b15aca5d8b2d82a1f76ab1 /Modules/CMakeBackwardCompatibilityCXX.cmake | |
parent | 60d1882a67a550c0fbe11e2462669830c89ee89e (diff) | |
parent | f21ac16edd0d2fbe78daf17bf5f964e4cfbd694b (diff) | |
download | CMake-18aaed77c0eb4ea81e02ece5d0be0525e4460828.zip CMake-18aaed77c0eb4ea81e02ece5d0be0525e4460828.tar.gz CMake-18aaed77c0eb4ea81e02ece5d0be0525e4460828.tar.bz2 |
Merge topic 'matches-cleanup'
f21ac16e Replace MATCHES test on numbers with EQUAL test
7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL ""
3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient
b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs
5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible
2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
Diffstat (limited to 'Modules/CMakeBackwardCompatibilityCXX.cmake')
-rw-r--r-- | Modules/CMakeBackwardCompatibilityCXX.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake index 343fdb2..f1db46e 100644 --- a/Modules/CMakeBackwardCompatibilityCXX.cmake +++ b/Modules/CMakeBackwardCompatibilityCXX.cmake @@ -31,15 +31,15 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) if(NOT CMAKE_COMPILER_IS_GNUCXX) include(TestCXXAcceptsFlag) set(CMAKE_TRY_ANSI_CXX_FLAGS "") - if(CMAKE_SYSTEM MATCHES "IRIX.*") + if(CMAKE_SYSTEM_NAME MATCHES "IRIX") set(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std") endif() - if(CMAKE_SYSTEM MATCHES "OSF.*") + if(CMAKE_SYSTEM_NAME MATCHES "OSF") set(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname") endif() # if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see # if the compiler accepts it - if( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+") + if(NOT CMAKE_TRY_ANSI_CXX_FLAGS STREQUAL "") CHECK_CXX_ACCEPTS_FLAG(${CMAKE_TRY_ANSI_CXX_FLAGS} CMAKE_CXX_ACCEPTS_FLAGS) # if the compiler liked the flag then set CMAKE_ANSI_CXXFLAGS # to the flag |