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
This commit is contained in:
Alex Neundorf 2013-07-19 22:57:33 +02:00
parent e3c9be07b2
commit 4b1919f73e
1 changed files with 3 additions and 1 deletions

View File

@ -792,7 +792,9 @@ void cmExportFileGenerator::GenerateImportVersionCode(std::ostream& os)
void cmExportFileGenerator::GenerateExpectedTargetsCode(std::ostream& os, void cmExportFileGenerator::GenerateExpectedTargetsCode(std::ostream& os,
const std::string &expectedTargets) 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(_targetsNotDefined)\n"
"set(_expectedTargets)\n" "set(_expectedTargets)\n"
"foreach(_expectedTarget " << expectedTargets << ")\n" "foreach(_expectedTarget " << expectedTargets << ")\n"