[Cmake-commits] CMake branch, next, updated. v2.8.2-595-g03e25d4

Alexander Neundorf neundorf at kde.org
Sun Aug 29 13:54:06 EDT 2010


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  03e25d4ef77c135eb3bc58430ad389522f144363 (commit)
       via  b4b8f963917b9473be283d5b844faee4a018945d (commit)
       via  cc955a042b582a12238cc94507bf50dd9bce1220 (commit)
      from  846c1ecad32f96dd76dd3eafc6946b4ce3137624 (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=03e25d4ef77c135eb3bc58430ad389522f144363
commit 03e25d4ef77c135eb3bc58430ad389522f144363
Merge: 846c1ec b4b8f96
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Aug 29 19:51:44 2010 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Aug 29 19:51:44 2010 +0200

    Merge branch 'ImproveFindPackageConfigMode' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b4b8f963917b9473be283d5b844faee4a018945d
commit b4b8f963917b9473be283d5b844faee4a018945d
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Aug 29 19:50:51 2010 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Aug 29 19:50:51 2010 +0200

    Don't create an empty element at the end of Foo_CONSIDERED_CONFIGS/VERSIONS
    
    Alex

diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 48122a8..8ee8fc7 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -935,10 +935,13 @@ bool cmFindPackageCommand::HandlePackageMode()
   for(std::vector<ConfigFileInfo>::size_type i=0;
       i<this->ConsideredConfigs.size(); i++)
     {
+    if (i>0)
+      {
+      consideredConfigFiles += ";";
+      consideredVersions += ";";
+      }
     consideredConfigFiles += this->ConsideredConfigs[i].filename;
-    consideredConfigFiles += ";";
     consideredVersions += this->ConsideredConfigs[i].version;
-    consideredVersions += ";";
     }
 
   this->Makefile->AddDefinition(consideredConfigsVar.c_str(),

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc955a042b582a12238cc94507bf50dd9bce1220
commit cc955a042b582a12238cc94507bf50dd9bce1220
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Aug 29 18:55:25 2010 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Aug 29 18:55:25 2010 +0200

    Small cleanup of FindPackageHandleStandardArgs.cmake
    
    -remove unnecessary arguments _VAR1
    -move code for deciding the type of the message into helper macro
     _FPHSA_FAILURE_MESSAGE()
    
    Alex

diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index c698480..db3af11 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -71,7 +71,18 @@ INCLUDE(FindPackageMessage)
 INCLUDE(CMakeParseArguments)
 
 
-FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1)
+MACRO(_FPHSA_FAILURE_MESSAGE _msg)
+  IF (${_NAME}_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "${_msg}")
+  ELSE (${_NAME}_FIND_REQUIRED)
+    IF (NOT ${_NAME}_FIND_QUIETLY)
+      MESSAGE(STATUS "${_msg}")
+    ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+  ENDIF (${_NAME}_FIND_REQUIRED)
+ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
+
+
+FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
 
 # set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
 # new extended or in the "old" mode:
@@ -83,11 +94,11 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1)
 
   IF(${INDEX} EQUAL -1)
     SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
-    SET(FPHSA_REQUIRED_VARS ${_VAR1} ${ARGN})
+    SET(FPHSA_REQUIRED_VARS ${ARGN})
     SET(FPHSA_VERSION_VAR)
   ELSE(${INDEX} EQUAL -1)
 
-    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${_VAR1} ${ARGN})
+    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${ARGN})
 
     IF(FPHSA_UNPARSED_ARGUMENTS)
       MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
@@ -112,7 +123,7 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1)
 
   STRING(TOUPPER ${_NAME} _NAME_UPPER)
 
-  # collect all variables which were not found, so they can be printed, so the 
+  # collect all variables which were not found, so they can be printed, so the
   # user knows better what went wrong (#6375)
   SET(MISSING_VARS "")
   SET(DETAILS "")
@@ -183,24 +194,9 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1)
     FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}")
   ELSE (${_NAME_UPPER}_FOUND)
     IF(NOT VERSION_OK)
-
-      IF (${_NAME}_FIND_REQUIRED)
-          MESSAGE(FATAL_ERROR "${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
-      ELSE (${_NAME}_FIND_REQUIRED)
-        IF (NOT ${_NAME}_FIND_QUIETLY)
-          MESSAGE(STATUS "${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
-        ENDIF (NOT ${_NAME}_FIND_QUIETLY)
-      ENDIF (${_NAME}_FIND_REQUIRED)
-
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
     ELSE(NOT VERSION_OK)
-
-      IF (${_NAME}_FIND_REQUIRED)
-          MESSAGE(FATAL_ERROR "${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
-      ELSE (${_NAME}_FIND_REQUIRED)
-        IF (NOT ${_NAME}_FIND_QUIETLY)
-          MESSAGE(STATUS "${FPHSA_FAIL_MESSAGE}  (missing: ${MISSING_VARS}) ${VERSION_MSG}")
-        ENDIF (NOT ${_NAME}_FIND_QUIETLY)
-      ENDIF (${_NAME}_FIND_REQUIRED)
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
     ENDIF(NOT VERSION_OK)
 
   ENDIF (${_NAME_UPPER}_FOUND)

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

Summary of changes:
 Modules/FindPackageHandleStandardArgs.cmake |   38 ++++++++++++---------------
 Source/cmFindPackageCommand.cxx             |    7 +++-
 2 files changed, 22 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list