diff options
author | Chuck Atkins <chuck.atkins@kitware.com> | 2017-05-03 17:56:03 (GMT) |
---|---|---|
committer | Chuck Atkins <chuck.atkins@kitware.com> | 2017-05-16 19:19:40 (GMT) |
commit | ef3d360a3de4a290c92c34827a3b68a8ce160840 (patch) | |
tree | f999d696f387ba6b0d71ebf9b013ca0723bb2989 /Source/cmFindPackageCommand.cxx | |
parent | 836cb52e9aec83f88841cb5b45abb1d32bb02214 (diff) | |
download | CMake-ef3d360a3de4a290c92c34827a3b68a8ce160840.zip CMake-ef3d360a3de4a290c92c34827a3b68a8ce160840.tar.gz CMake-ef3d360a3de4a290c92c34827a3b68a8ce160840.tar.bz2 |
find_*: Add a new PackageRoot search path group
The new PackageRoot search path group allows the PackageName_ROOT cmake
and environment variables to be used as search prefixes for all find_*
commands called from within a find module
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 17fa92c..6f6a3f6 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -10,6 +10,7 @@ #include "cmsys/String.h" #include <algorithm> #include <assert.h> +#include <deque> #include <functional> #include <iterator> #include <sstream> @@ -585,6 +586,9 @@ void cmFindPackageCommand::SetModuleVariables(const std::string& components) exact += "_FIND_VERSION_EXACT"; this->AddFindDefinition(exact, this->VersionExact ? "1" : "0"); } + + // Push on to the pacakge stack + this->Makefile->FindPackageModuleStack.push_back(this->Name); } void cmFindPackageCommand::AddFindDefinition(const std::string& var, @@ -1059,6 +1063,9 @@ void cmFindPackageCommand::AppendSuccessInformation() // Restore original state of "_FIND_" variables we set. this->RestoreFindDefinitions(); + + // Pop the package stack + this->Makefile->FindPackageModuleStack.pop_back(); } void cmFindPackageCommand::ComputePrefixes() |