[Cmake-commits] CMake branch, next, updated. v2.8.11-2407-g0f4bade

Rolf Eike Beer eike at sf-mail.de
Sun Jun 2 16:23:10 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  0f4bade9cebed87218859b927320b70daedd4b6b (commit)
       via  cd4451d1e738a729a1a8d0ed34b544cada1de078 (commit)
      from  e6e8fcb9e9835cba7cd60cae22940bbbb9fe6d1b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f4bade9cebed87218859b927320b70daedd4b6b
commit 0f4bade9cebed87218859b927320b70daedd4b6b
Merge: e6e8fcb cd4451d
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sun Jun 2 16:23:07 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Jun 2 16:23:07 2013 -0400

    Merge topic 'useless-MATCHES' into next
    
    cd4451d replace string(... MATCHES "^const$) with string(... STREQUAL "const")


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd4451d1e738a729a1a8d0ed34b544cada1de078
commit cd4451d1e738a729a1a8d0ed34b544cada1de078
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Sun Jun 2 21:42:10 2013 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Sun Jun 2 22:18:19 2013 +0200

    replace string(... MATCHES "^const$) with string(... STREQUAL "const")

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}")
 
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 048f966..50dccbe 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -45,12 +45,12 @@ endmacro()
 TEST_ARGC(-DCMAKE_ARGV1 -DCMAKE_ARGV2 -DCMAKE_ARGV3 -DCMAKE_ARGV4)
 
 macro(TEST_VAR_ARG fa)
-  if("${ARGV}" MATCHES "^1;2;3$")
+  if("${ARGV}" STREQUAL "1;2;3")
     message(STATUS "ARGV works")
   else()
     message(FATAL_ERROR "ARGV does not work; got \"${ARGV}\" instead of \"1;2;3\"")
   endif()
-  if("${ARGN}" MATCHES "^2;3$")
+  if("${ARGN}" STREQUAL "2;3")
     message(STATUS "ARGN works")
   else()
     message(FATAL_ERROR "ARGV does not work; got \"${ARGN}\" instead of \"2;3\"")
@@ -163,7 +163,7 @@ execute_process(
   COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
   OUTPUT_VARIABLE TEST_OUT
   )
-if("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
+if("${TEST_OUT}" STREQUAL "ABCDEFG\n")
 else()
   message(SEND_ERROR "EXECUTE_PROCESS output test failed: [${TEST_OUT}]")
 endif()
@@ -177,7 +177,7 @@ endif()
 #   ERROR_QUIET
 #   RESULT_VARIABLE RESULT
 #   )
-# if("${RESULT}" MATCHES "^0$")
+# if("${RESULT}" STREQUAL "0")
 #   message(SEND_ERROR
 #     "EXECUTE_PROCESS result test failed with RESULT=[${RESULT}]")
 # else()
@@ -387,10 +387,7 @@ if(NOT RESULT)
   message(SEND_ERROR "string(REGEX MATCHALL ... ) test failed.")
 endif()
 string(REGEX REPLACE ".([bd])." "[\\1]" RESULT "a(b)c(d)e")
-if("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$")
-  set(STRING_REGEX_PASSED 1)
-endif()
-if(NOT STRING_REGEX_PASSED)
+if(NOT RESULT STREQUAL "a[b]c[d]e")
   message(SEND_ERROR
     "string(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")")
 endif()
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index b0748fe..cbb4286 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -45,12 +45,12 @@ endmacro()
 TEST_ARGC(-DCMAKE_ARGV1 -DCMAKE_ARGV2 -DCMAKE_ARGV3 -DCMAKE_ARGV4)
 
 macro(TEST_VAR_ARG fa)
-  if("${ARGV}" MATCHES "^1;2;3$")
+  if("${ARGV}" STREQUAL "1;2;3")
     message(STATUS "ARGV works")
   else()
     message(FATAL_ERROR "ARGV does not work; got \"${ARGV}\" instead of \"1;2;3\"")
   endif()
-  if("${ARGN}" MATCHES "^2;3$")
+  if("${ARGN}" STREQUAL "2;3")
     message(STATUS "ARGN works")
   else()
     message(FATAL_ERROR "ARGV does not work; got \"${ARGN}\" instead of \"2;3\"")
@@ -163,7 +163,7 @@ execute_process(
   COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
   OUTPUT_VARIABLE TEST_OUT
   )
-if("${TEST_OUT}" MATCHES "^ABCDEFG\n$")
+if("${TEST_OUT}" STREQUAL "ABCDEFG\n")
 else()
   message(SEND_ERROR "EXECUTE_PROCESS output test failed: [${TEST_OUT}]")
 endif()
@@ -177,7 +177,7 @@ endif()
 #   ERROR_QUIET
 #   RESULT_VARIABLE RESULT
 #   )
-# if("${RESULT}" MATCHES "^0$")
+# if("${RESULT}" STREQUAL "0")
 #   message(SEND_ERROR
 #     "EXECUTE_PROCESS result test failed with RESULT=[${RESULT}]")
 # else()
@@ -357,10 +357,7 @@ if(NOT RESULT)
   message(SEND_ERROR "string(REGEX MATCHALL ... ) test failed.")
 endif()
 string(REGEX REPLACE ".([bd])." "[\\1]" RESULT "a(b)c(d)e")
-if("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$")
-  set(STRING_REGEX_PASSED 1)
-endif()
-if(NOT STRING_REGEX_PASSED)
+if(NOT RESULT STREQUAL "a[b]c[d]e")
   message(SEND_ERROR
     "string(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")")
 endif()
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index 479d6ec..b969bfd 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -122,7 +122,7 @@ if(STAGE2)
       RESULT_VARIABLE SAMPLE_SCRIPT_RESULT
       OUTPUT_VARIABLE SAMPLE_SCRIPT_OUTPUT
       )
-    if(NOT "${SAMPLE_SCRIPT_RESULT}" MATCHES "^0$")
+    if(NOT "${SAMPLE_SCRIPT_RESULT}" STREQUAL "0")
       message(FATAL_ERROR
         "Sample script [${CUR_SCRIPT}] failed: [${SAMPLE_SCRIPT_RESULT}]")
     endif()
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index 479d6ec..b969bfd 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -122,7 +122,7 @@ if(STAGE2)
       RESULT_VARIABLE SAMPLE_SCRIPT_RESULT
       OUTPUT_VARIABLE SAMPLE_SCRIPT_OUTPUT
       )
-    if(NOT "${SAMPLE_SCRIPT_RESULT}" MATCHES "^0$")
+    if(NOT "${SAMPLE_SCRIPT_RESULT}" STREQUAL "0")
       message(FATAL_ERROR
         "Sample script [${CUR_SCRIPT}] failed: [${SAMPLE_SCRIPT_RESULT}]")
     endif()

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeBackwardCompatibilityC.cmake |    2 +-
 Modules/CTest.cmake                       |    4 ++--
 Modules/ExternalData.cmake                |    2 +-
 Modules/FindThreads.cmake                 |    2 +-
 Modules/FindXMLRPC.cmake                  |    4 ++--
 Tests/Complex/CMakeLists.txt              |   13 +++++--------
 Tests/ComplexOneConfig/CMakeLists.txt     |   13 +++++--------
 Tests/SimpleInstall/CMakeLists.txt        |    2 +-
 Tests/SimpleInstallS2/CMakeLists.txt      |    2 +-
 9 files changed, 19 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list