diff options
author | Christoph GrĂ¼ninger <foss@grueninger.de> | 2016-07-10 13:35:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-07-11 15:35:27 (GMT) |
commit | c376c5bca204a689b5bcfec88291b8bc7f226e7f (patch) | |
tree | 1c0436a4113e019661f4f765220657360eae9e80 | |
parent | 507aa256e517e33aa109b854b444b08863447cf4 (diff) | |
download | CMake-c376c5bca204a689b5bcfec88291b8bc7f226e7f.zip CMake-c376c5bca204a689b5bcfec88291b8bc7f226e7f.tar.gz CMake-c376c5bca204a689b5bcfec88291b8bc7f226e7f.tar.bz2 |
Do not place CMake version in export files
Files generated by `install(EXPORT)` and `export_library_dependencies()`
may be installed with packages and consumed by dependents. In order to
avoid re-building dependents only because the version of CMake changed,
drop the CMake version from the export file content.
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmExportLibraryDependenciesCommand.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index d93e406..e00af5e 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -93,7 +93,7 @@ bool cmExportFileGenerator::GenerateImportFile() // Protect that file against use with older CMake versions. /* clang-format off */ - os << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n"; + os << "# Generated by CMake\n\n"; os << "if(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n" << " message(FATAL_ERROR \"CMake >= 2.6.0 required\")\n" << "endif()\n"; diff --git a/Source/cmExportLibraryDependenciesCommand.cxx b/Source/cmExportLibraryDependenciesCommand.cxx index c8272cb..b422a2c 100644 --- a/Source/cmExportLibraryDependenciesCommand.cxx +++ b/Source/cmExportLibraryDependenciesCommand.cxx @@ -152,7 +152,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const // versions. const char* vertest = "\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" GREATER 2.4"; - fout << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n"; + fout << "# Generated by CMake\n\n"; fout << "if(" << vertest << ")\n"; fout << " # Information for CMake 2.6 and above.\n"; for (std::map<std::string, std::string>::const_iterator i = |