summaryrefslogtreecommitdiff
path: root/Modules/FeatureSummary.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-02-03 20:18:37 +0100
committerStephen Kelly <steveire@gmail.com>2014-02-03 20:20:42 +0100
commita6971f6510e532b10f6548f0b77592f41faba38f (patch)
tree9d3d48a66a526bf731f416f75079e88c9ec1aa1f /Modules/FeatureSummary.cmake
parentcd711ed0526de706c17c228e06f5010772cd217c (diff)
downloadcmake-a6971f6510e532b10f6548f0b77592f41faba38f.tar.gz
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
Diffstat (limited to 'Modules/FeatureSummary.cmake')
-rw-r--r--Modules/FeatureSummary.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index b0f8e1653f..c0e63d5318 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)