[Cmake-commits] CMake branch, next, updated. v3.0.1-5211-g1690ebc

Brad King brad.king at kitware.com
Mon Sep 8 12:51:05 EDT 2014


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  1690ebc29eb6ec8cf92b7062feb76bff4d76f8c9 (commit)
       via  f8933de08d5d30fbf4e85c5139e7fb32f786b0e0 (commit)
       via  499fe053d253c8b5e325620d36a8b7e5684ada32 (commit)
       via  cfa3a5e8bf417ccc01bab53f1671e0dab76901e4 (commit)
       via  7c369c0b86b897835e8dcdc9eafbf8a54522b751 (commit)
       via  a570216a7f454c38303cab9508a028002902d222 (commit)
      from  283ae77d7d74e9fb1e9c5f2f52cfa6f18aa9491a (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=1690ebc29eb6ec8cf92b7062feb76bff4d76f8c9
commit 1690ebc29eb6ec8cf92b7062feb76bff4d76f8c9
Merge: 283ae77 f8933de
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 8 12:51:04 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 8 12:51:04 2014 -0400

    Merge topic 'if-sanity' into next
    
    f8933de0 FPHSA: Avoid if() dereferencing of quoted variable
    499fe053 cmcurl: Use if(DEFINED) to simplify conditions
    cfa3a5e8 libarchive: Avoid depending on if() to dereference a quoted variable
    7c369c0b FindGTK2: Avoid depending on if() to dereference a quoted variable
    a570216a Modules/Test*.cmake: Use if(DEFINED) to simplify conditions


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8933de08d5d30fbf4e85c5139e7fb32f786b0e0
commit f8933de08d5d30fbf4e85c5139e7fb32f786b0e0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 8 11:20:27 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 8 12:42:45 2014 -0400

    FPHSA: Avoid if() dereferencing of quoted variable
    
    Legacy invocations may pass a variable name where "DEFAULT_MSG" belongs.
    When comparing FPHSA_FAIL_MESSAGE to "DEFAULT_MSG", use a leading "x" on
    both sides to avoid mistaking the value of the message for a variable
    name.

diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index d030418..e8d1dfb 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -201,7 +201,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
 
 # now that we collected all arguments, process them
 
-  if("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+  if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG")
     set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
   endif()
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=499fe053d253c8b5e325620d36a8b7e5684ada32
commit 499fe053d253c8b5e325620d36a8b7e5684ada32
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 8 10:02:55 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 8 12:42:45 2014 -0400

    cmcurl: Use if(DEFINED) to simplify conditions
    
    Replace old hacks of the form 'if("${VAR}" MATCHES "^${VAR}$")'
    with the much simpler 'if(NOT DEFINED ${VAR})'.

diff --git a/Utilities/cmcurl/CMake/CurlCheckCSourceCompiles.cmake b/Utilities/cmcurl/CMake/CurlCheckCSourceCompiles.cmake
index cfcf47b..2f427a2 100644
--- a/Utilities/cmcurl/CMake/CurlCheckCSourceCompiles.cmake
+++ b/Utilities/cmcurl/CMake/CurlCheckCSourceCompiles.cmake
@@ -13,7 +13,7 @@
 #  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
 
 MACRO(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
-  IF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
+  IF(NOT DEFINED ${VAR} OR ${VAR} MATCHES "UNKNOWN")
     SET(message "${VAR}")
     # If the number of arguments is greater than 2 (SOURCE VAR)
     IF(${ARGC} GREATER 2)
@@ -70,5 +70,5 @@ MACRO(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
         "${OUTPUT}\n"
         "Source file was:\n${src}\n")
     ENDIF(${VAR})
-  ENDIF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
+  ENDIF()
 ENDMACRO(CURL_CHECK_C_SOURCE_COMPILES)
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 1b918c9..03f10a0 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -505,7 +505,7 @@ ENDIF(NOT HAVE_SIGSETJMP)
 
 # For other curl specific tests, use this macro.
 MACRO(CURL_INTERNAL_TEST CURL_TEST)
-  IF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
+  IF(NOT DEFINED ${CURL_TEST})
     SET(MACRO_CHECK_FUNCTION_DEFINITIONS
       "-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
     IF(CMAKE_REQUIRED_LIBRARIES)
@@ -533,7 +533,7 @@ MACRO(CURL_INTERNAL_TEST CURL_TEST)
         "Performing Curl Test ${CURL_TEST} failed with the following output:\n"
         "${OUTPUT}\n")
     ENDIF(${CURL_TEST})
-  ENDIF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
+  ENDIF()
 ENDMACRO(CURL_INTERNAL_TEST)
 
 # Do curl specific tests

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfa3a5e8bf417ccc01bab53f1671e0dab76901e4
commit cfa3a5e8bf417ccc01bab53f1671e0dab76901e4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 8 10:01:47 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 8 12:42:45 2014 -0400

    libarchive: Avoid depending on if() to dereference a quoted variable

diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 87a9c3f..f1459d4 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -840,14 +840,14 @@ ENDIF()
 # Check functions
 #
 CMAKE_PUSH_CHECK_STATE()	# Save the state of the variables
-IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+IF (CMAKE_C_COMPILER_ID STREQUAL "GNU")
   #
   # During checking functions, we should use -fno-builtin to avoid the
   # failure of function detection which failure is an error "conflicting
   # types for built-in function" caused by using -Werror option.
   #
   SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fno-builtin")
-ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$")
+ENDIF ()
 CHECK_SYMBOL_EXISTS(_CrtSetReportMode "crtdbg.h" HAVE__CrtSetReportMode)
 CHECK_FUNCTION_EXISTS_GLIBC(chflags HAVE_CHFLAGS)
 CHECK_FUNCTION_EXISTS_GLIBC(chown HAVE_CHOWN)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c369c0b86b897835e8dcdc9eafbf8a54522b751
commit 7c369c0b86b897835e8dcdc9eafbf8a54522b751
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 8 09:59:47 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 8 12:42:45 2014 -0400

    FindGTK2: Avoid depending on if() to dereference a quoted variable
    
    Explicitly dereference GTK2_${_var}CONFIG_INCLUDE_DIR and
    GTK2_${_var}_INCLUDE_DIR when comparing their values.

diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index 67dc0eb..72bb8eb 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -527,7 +527,7 @@ function(_GTK2_ADD_TARGET _var)
             set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}_INCLUDE_DIR}")
         endif()
 
-        if(GTK2_${_var}CONFIG_INCLUDE_DIR AND NOT "${GTK2_${_var}CONFIG_INCLUDE_DIR}" STREQUAL "GTK2_${_var}_INCLUDE_DIR")
+        if(GTK2_${_var}CONFIG_INCLUDE_DIR AND NOT "x${GTK2_${_var}CONFIG_INCLUDE_DIR}" STREQUAL "x${GTK2_${_var}_INCLUDE_DIR}")
             set_property(TARGET GTK2::${_basename} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GTK2_${_var}CONFIG_INCLUDE_DIR}")
         endif()
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a570216a7f454c38303cab9508a028002902d222
commit a570216a7f454c38303cab9508a028002902d222
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 8 09:58:33 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 8 12:42:45 2014 -0400

    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})'.

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

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

Summary of changes:
 Modules/FindGTK2.cmake                                |    2 +-
 Modules/FindPackageHandleStandardArgs.cmake           |    2 +-
 Modules/TestBigEndian.cmake                           |    2 +-
 Modules/TestForANSIForScope.cmake                     |    2 +-
 Modules/TestForSSTREAM.cmake                          |    2 +-
 Modules/TestForSTDNamespace.cmake                     |    2 +-
 Utilities/cmcurl/CMake/CurlCheckCSourceCompiles.cmake |    4 ++--
 Utilities/cmcurl/CMakeLists.txt                       |    4 ++--
 Utilities/cmlibarchive/CMakeLists.txt                 |    4 ++--
 9 files changed, 12 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list