summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmFindPackageCommand.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 78b73fd..9e998aa 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1298,6 +1298,7 @@ bool cmFindPackageCommand::CheckVersionFile(std::string const& version_file)
{
// The version file will be loaded in an isolated scope.
this->Makefile->PushScope();
+ this->Makefile->PushPolicy();
// Clear the output variables.
this->Makefile->RemoveDefinition("PACKAGE_VERSION");
@@ -1364,6 +1365,7 @@ bool cmFindPackageCommand::CheckVersionFile(std::string const& version_file)
}
// Restore the original scope.
+ this->Makefile->PopPolicy();
this->Makefile->PopScope();
// Succeed if the version is suitable.