summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorChristoph GrĂ¼ninger <foss@grueninger.de>2016-07-10 15:35:24 +0200
committerBrad King <brad.king@kitware.com>2016-07-11 11:35:27 -0400
commitc376c5bca204a689b5bcfec88291b8bc7f226e7f (patch)
tree1c0436a4113e019661f4f765220657360eae9e80 /Source
parent507aa256e517e33aa109b854b444b08863447cf4 (diff)
downloadcmake-c376c5bca204a689b5bcfec88291b8bc7f226e7f.tar.gz
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportFileGenerator.cxx2
-rw-r--r--Source/cmExportLibraryDependenciesCommand.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index d93e40676f..e00af5ef09 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 c8272cb899..b422a2c856 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 =