summaryrefslogtreecommitdiffstats
path: root/Source/cmExportInstallFileGenerator.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-09-15 19:55:24 (GMT)
committerBrad King <brad.king@kitware.com>2012-09-28 13:21:42 (GMT)
commit87f4c01910754199bcdcbc9d564de13d36ba2502 (patch)
tree82542c001615b1b8fb32d82ce28cd6358affa9ae /Source/cmExportInstallFileGenerator.cxx
parent999061a4c2000213e6f04695f1f1fe546c86703d (diff)
downloadCMake-87f4c01910754199bcdcbc9d564de13d36ba2502.zip
CMake-87f4c01910754199bcdcbc9d564de13d36ba2502.tar.gz
CMake-87f4c01910754199bcdcbc9d564de13d36ba2502.tar.bz2
exports: accept a missing target if it is exported exactly once
If a target is exported, and a library it depends on is not part of the same export set, before this patch cmake errored out. With this patch, it now checks whether the missing target is exported somewhere else exactly once, and accepts in this case (because then it can determine the namespace for the missing target and use this). Alex
Diffstat (limited to 'Source/cmExportInstallFileGenerator.cxx')
-rw-r--r--Source/cmExportInstallFileGenerator.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index d4f7fd5..ba048b5 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -327,14 +327,24 @@ cmExportInstallFileGenerator
//----------------------------------------------------------------------------
void
cmExportInstallFileGenerator
-::ComplainAboutMissingTarget(cmTarget* depender, cmTarget* dependee)
+::ComplainAboutMissingTarget(cmTarget* depender,
+ cmTarget* dependee,
+ int occurrences)
{
cmOStringStream e;
e << "INSTALL(EXPORT \""
<< this->IEGen->GetExportSet()->GetName()
<< "\" ...) "
<< "includes target \"" << depender->GetName()
- << "\" which requires target \"" << dependee->GetName()
- << "\" that is not in the export set.";
+ << "\" which requires target \"" << dependee->GetName() << "\" ";
+ if (occurrences == 0)
+ {
+ e << "that is not in the export set.";
+ }
+ else
+ {
+ e << "that is not in this export set, but " << occurrences
+ << " times in others.";
+ }
cmSystemTools::Error(e.str().c_str());
}