From 4b1919f73e7663799285171b472d76053fb99166 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Fri, 19 Jul 2013 22:57:33 +0200 Subject: 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 --- Source/cmExportFileGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" -- cgit v0.12