diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-02-03 19:18:37 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-02-03 19:20:42 (GMT) |
commit | a6971f6510e532b10f6548f0b77592f41faba38f (patch) | |
tree | 9d3d48a66a526bf731f416f75079e88c9ec1aa1f /Source/cmFindPackageCommand.cxx | |
parent | cd711ed0526de706c17c228e06f5010772cd217c (diff) | |
download | CMake-a6971f6510e532b10f6548f0b77592f41faba38f.zip CMake-a6971f6510e532b10f6548f0b77592f41faba38f.tar.gz CMake-a6971f6510e532b10f6548f0b77592f41faba38f.tar.bz2 |
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 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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); |