summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2013-07-19 20:57:33 (GMT)
committerAlex Neundorf <neundorf@kde.org>2013-07-19 20:57:33 (GMT)
commit4b1919f73e7663799285171b472d76053fb99166 (patch)
tree940b0517f9f5ccb5ed597133ee3be716d91064b3
parente3c9be07b25efd06bf38bcd1a740f8bfe7cfb24c (diff)
downloadCMake-4b1919f73e7663799285171b472d76053fb99166.zip
CMake-4b1919f73e7663799285171b472d76053fb99166.tar.gz
CMake-4b1919f73e7663799285171b472d76053fb99166.tar.bz2
ExportTargets: add one more comment to the generated file.
This patch adds a comment above the block which protects the exported targets file against multiple inclusion, to make the file easier to understand for readers. Alex
-rw-r--r--Source/cmExportFileGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index b4e6e81..90e6d51 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -792,7 +792,9 @@ void cmExportFileGenerator::GenerateImportVersionCode(std::ostream& os)
void cmExportFileGenerator::GenerateExpectedTargetsCode(std::ostream& os,
const std::string &expectedTargets)
{
- os << "set(_targetsDefined)\n"
+ os << "# Protect against multiple inclusion, which would fail when already "
+ "imported targets are added once more.\n"
+ "set(_targetsDefined)\n"
"set(_targetsNotDefined)\n"
"set(_expectedTargets)\n"
"foreach(_expectedTarget " << expectedTargets << ")\n"