[Cmake-commits] CMake branch, next, updated. v2.8.12.2-7404-gb2c1f33

Stephen Kelly steveire at gmail.com
Mon Feb 3 14:26:42 EST 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  b2c1f33e0938a4748d8b6740b6f8d67543cd62de (commit)
       via  a6971f6510e532b10f6548f0b77592f41faba38f (commit)
      from  5df5eab6706dd849a5ea10f5b447691eeaca74ec (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=b2c1f33e0938a4748d8b6740b6f8d67543cd62de
commit b2c1f33e0938a4748d8b6740b6f8d67543cd62de
Merge: 5df5eab a6971f6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Feb 3 14:26:41 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 3 14:26:41 2014 -0500

    Merge topic 'FeatureSummary-no-transitive' into next
    
    a6971f65 FeatureSummary: Don't list transitive package dependencies


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6971f6510e532b10f6548f0b77592f41faba38f
commit a6971f6510e532b10f6548f0b77592f41faba38f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Feb 3 20:18:37 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Feb 3 20:20:42 2014 +0100

    FeatureSummary: Don't list transitive package dependencies
    
    Set a global property in the find_package implementation.  Track and
    reset that property in the find_dependency macro.  Read the property
    in FeatureSummary when determining whether to print output.
    
    This means that packages which are found only as dependencies are not
    listed by FeatureSummary, but if a project uses find_package elsewhere
    directly, then it will be listed by FeatureSummary.
    
    Suggested-by: Alex Merry
    
     http://thread.gmane.org/gmane.comp.kde.devel.frameworks/10640

diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake
index 596c6fc..0f1f56d 100644
--- a/Modules/CMakeFindDependencyMacro.cmake
+++ b/Modules/CMakeFindDependencyMacro.cmake
@@ -45,7 +45,16 @@ macro(find_dependency dep)
       set(required_arg REQUIRED)
     endif()
 
+    get_property(alreadyTransitive GLOBAL PROPERTY
+      _CMAKE_${dep}_TRANSITIVE_DEPENDENCY
+    )
+
     find_package(${dep} ${version} ${exact_arg} ${quiet_arg} ${required_arg})
+
+    if(NOT DEFINED alreadyTransitive OR alreadyTransitive)
+      set_property(GLOBAL PROPERTY _CMAKE_${dep}_TRANSITIVE_DEPENDENCY TRUE)
+    endif()
+
     if (NOT ${dep}_FOUND)
       set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${dep} could not be found.")
       set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index b0f8e16..c0e63d5 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -376,6 +376,12 @@ function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
           set(includeThisOne FALSE)
         endif()
       endif()
+      get_property(_isTransitiveDepend
+        GLOBAL PROPERTY _CMAKE_${_currentFeature}_TRANSITIVE_DEPENDENCY
+      )
+      if(_isTransitiveDepend)
+        set(includeThisOne FALSE)
+      endif()
 
       if(includeThisOne)
 
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index c59aafd..73eba51 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1043,6 +1043,12 @@ void cmFindPackageCommand::AppendToFoundProperty(bool found)
 //----------------------------------------------------------------------------
 void cmFindPackageCommand::AppendSuccessInformation()
 {
+  {
+  std::string transitivePropName = "_CMAKE_";
+  transitivePropName += this->Name + "_TRANSITIVE_DEPENDENCY";
+  this->Makefile->GetCMakeInstance()
+                ->SetProperty(transitivePropName.c_str(), "False");
+  }
   std::string found = this->Name;
   found += "_FOUND";
   std::string upperFound = cmSystemTools::UpperCase(found);

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

Summary of changes:
 Modules/CMakeFindDependencyMacro.cmake |    9 +++++++++
 Modules/FeatureSummary.cmake           |    6 ++++++
 Source/cmFindPackageCommand.cxx        |    6 ++++++
 3 files changed, 21 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list