summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx66
1 files changed, 1 insertions, 65 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index dc4fa31..5d95668 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -233,30 +233,7 @@ cmExportFileGenerator
}
else
{
- std::vector<std::string> namespaces = this->FindNamespaces(mf, *li);
- int targetOccurrences = (int)namespaces.size();
-
- if (targetOccurrences == 1)
- {
- std::string missingTarget = namespaces[0];
- missingTarget += *li;
- link_libs += missingTarget;
- missingTargets.push_back(missingTarget);
- }
- else
- {
- // The target is not in the export.
- if(!this->AppendMode)
- {
- // We are not appending, so all exported targets should be
- // known here. This is probably user-error.
- this->ComplainAboutMissingTarget(target, tgt, targetOccurrences);
- }
- // Assume the target will be exported by another command.
- // Append it with the export namespace.
- link_libs += this->Namespace;
- link_libs += *li;
- }
+ this->HandleMissingTarget(link_libs, missingTargets, mf, target, tgt);
}
}
else
@@ -274,47 +251,6 @@ cmExportFileGenerator
//----------------------------------------------------------------------------
-std::vector<std::string> cmExportFileGenerator::FindNamespaces(cmMakefile* mf,
- const std::string& name)
-{
- std::vector<std::string> namespaces;
- cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator();
- const cmExportSetMap& exportSets = gg->GetExportSets();
-
- for(cmExportSetMap::const_iterator expIt = exportSets.begin();
- expIt != exportSets.end();
- ++expIt)
- {
- const cmExportSet* exportSet = expIt->second;
- std::vector<cmTargetExport*> const* targets =
- exportSet->GetTargetExports();
-
- bool containsTarget = false;
- for(unsigned int i=0; i<targets->size(); i++)
- {
- if (name == (*targets)[i]->Target->GetName())
- {
- containsTarget = true;
- break;
- }
- }
-
- if (containsTarget)
- {
- std::vector<cmInstallExportGenerator const*> const* installs =
- exportSet->GetInstallations();
- for(unsigned int i=0; i<installs->size(); i++)
- {
- namespaces.push_back((*installs)[i]->GetNamespace());
- }
- }
- }
-
- return namespaces;
-}
-
-
-//----------------------------------------------------------------------------
void cmExportFileGenerator::GenerateImportHeaderCode(std::ostream& os,
const char* config)
{