diff options
author | Brad King <brad.king@kitware.com> | 2008-03-31 17:48:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-03-31 17:48:50 (GMT) |
commit | 6d064999f60202ef0d896b9256d28e96ddf39104 (patch) | |
tree | e6caa53bf15a27dc7a5a364afa1b01c5090411cb /Source/cmExportFileGenerator.cxx | |
parent | e3666a1de575c7a2c4ef757b3f6e9a63fdfa2b8e (diff) | |
download | CMake-6d064999f60202ef0d896b9256d28e96ddf39104.zip CMake-6d064999f60202ef0d896b9256d28e96ddf39104.tar.gz CMake-6d064999f60202ef0d896b9256d28e96ddf39104.tar.bz2 |
BUG: Generated target export files should set the policy version to 2.6 instead of the currently running version because they are 2.6 compatible.
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 914b044..1e0a8d9 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -79,12 +79,14 @@ bool cmExportFileGenerator::GenerateImportFile() } std::ostream& os = *foutPtr; - // Start with the import file header. + // Isolate the file policy level. + // We use 2.6 here instead of the current version because newer + // versions of CMake should be able to export files imported by 2.6 + // until the import format changes. os << "CMAKE_POLICY(PUSH)\n" - << "CMAKE_POLICY(VERSION " - << cmVersion::GetMajorVersion() << "." - << cmVersion::GetMinorVersion() << "." - << cmVersion::GetPatchVersion() << ")\n"; + << "CMAKE_POLICY(VERSION 2.6)\n"; + + // Start with the import file header. this->GenerateImportHeaderCode(os); // Create all the imported targets. |