diff options
author | Brad King <brad.king@kitware.com> | 2013-06-03 13:57:53 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-06-03 13:57:53 (GMT) |
commit | d114fc373c1499689265c6c12e95b86f2930b227 (patch) | |
tree | 60f5a5b2b8d8fd40fb63d86c0c2d5da470e35eea /Modules | |
parent | e57b6a25211ea28b7b01aadfc3aaf1de79455bdb (diff) | |
parent | cd4451d1e738a729a1a8d0ed34b544cada1de078 (diff) | |
download | CMake-d114fc373c1499689265c6c12e95b86f2930b227.zip CMake-d114fc373c1499689265c6c12e95b86f2930b227.tar.gz CMake-d114fc373c1499689265c6c12e95b86f2930b227.tar.bz2 |
Merge topic 'useless-MATCHES'
cd4451d replace string(... MATCHES "^const$) with string(... STREQUAL "const")
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeBackwardCompatibilityC.cmake | 2 | ||||
-rw-r--r-- | Modules/CTest.cmake | 4 | ||||
-rw-r--r-- | Modules/ExternalData.cmake | 2 | ||||
-rw-r--r-- | Modules/FindThreads.cmake | 2 | ||||
-rw-r--r-- | Modules/FindXMLRPC.cmake | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake index e3b6c82..4783d68 100644 --- a/Modules/CMakeBackwardCompatibilityC.cmake +++ b/Modules/CMakeBackwardCompatibilityC.cmake @@ -55,7 +55,7 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN) include (FindX11) - if("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$") + if("${X11_X11_INCLUDE_PATH}" STREQUAL "/usr/include") set (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.") else() set (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 562e248..5cd62f6 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -84,13 +84,13 @@ if(BUILD_TESTING) endmacro() macro(SET_IF_SET var val) - if(NOT "${val}" MATCHES "^$") + if(NOT "${val}" STREQUAL "") set("${var}" "${val}") endif() endmacro() macro(SET_IF_SET_AND_NOT_SET var val) - if(NOT "${val}" MATCHES "^$") + if(NOT "${val}" STREQUAL "") SET_IF_NOT_SET("${var}" "${val}") endif() endmacro() diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake index 8332725..50669bd 100644 --- a/Modules/ExternalData.cmake +++ b/Modules/ExternalData.cmake @@ -391,7 +391,7 @@ function(_ExternalData_arg target arg options var_file) # Regular expression to match associated files. string(REGEX REPLACE "^REGEX:" "" regex "${opt}") list(APPEND associated_regex "${regex}") - elseif("x${opt}" MATCHES "^x:$") + elseif(opt STREQUAL ":") # Activate series matching. set(series_option "${opt}") elseif("x${opt}" MATCHES "^[^][:/*?]+$") diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 5d76777..f03908e 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -93,7 +93,7 @@ else() COMPILE_OUTPUT_VARIABLE OUTPUT) if(THREADS_HAVE_PTHREAD_ARG) - if(THREADS_PTHREAD_ARG MATCHES "^2$") + if(THREADS_PTHREAD_ARG STREQUAL "2") set(Threads_FOUND TRUE) message(STATUS "Check if compiler accepts -pthread - yes") else() diff --git a/Modules/FindXMLRPC.cmake b/Modules/FindXMLRPC.cmake index 6bb578b..c80249b 100644 --- a/Modules/FindXMLRPC.cmake +++ b/Modules/FindXMLRPC.cmake @@ -53,7 +53,7 @@ if(XMLRPC_FOUND) endif() # Parse the include flags. - if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") + if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0") # Convert the compile flags to a CMake list. string(REGEX REPLACE " +" ";" XMLRPC_C_CONFIG_CFLAGS "${XMLRPC_C_CONFIG_CFLAGS}") @@ -91,7 +91,7 @@ if(XMLRPC_FOUND) endif() # Parse the library names and directories. - if("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") + if("${XMLRPC_C_CONFIG_RESULT}" STREQUAL "0") string(REGEX REPLACE " +" ";" XMLRPC_C_CONFIG_LIBS "${XMLRPC_C_CONFIG_LIBS}") |