diff options
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index f28f841..914b044 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -20,6 +20,7 @@ #include "cmMakefile.h" #include "cmSystemTools.h" #include "cmTarget.h" +#include "cmVersion.h" #include <cmsys/auto_ptr.hxx> @@ -79,6 +80,11 @@ bool cmExportFileGenerator::GenerateImportFile() std::ostream& os = *foutPtr; // Start with the import file header. + os << "CMAKE_POLICY(PUSH)\n" + << "CMAKE_POLICY(VERSION " + << cmVersion::GetMajorVersion() << "." + << cmVersion::GetMinorVersion() << "." + << cmVersion::GetPatchVersion() << ")\n"; this->GenerateImportHeaderCode(os); // Create all the imported targets. @@ -86,6 +92,7 @@ bool cmExportFileGenerator::GenerateImportFile() // End with the import file footer. this->GenerateImportFooterCode(os); + os << "CMAKE_POLICY(POP)\n"; return result; } |