diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index 194d9a233..c24138f55 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -235,14 +235,17 @@ cmExportBuildFileGenerator //---------------------------------------------------------------------------- void cmExportBuildFileGenerator::HandleMissingTarget( - std::string& link_libs, std::vector& missingTargets, - cmMakefile* mf, cmTarget* depender, cmTarget* dependee) + std::string& link_libs, + std::vector& missingTargets, + cmTarget* depender, + cmTarget* dependee) { // The target is not in the export. if(!this->AppendMode) { const std::string name = dependee->GetName(); - std::vector namespaces = this->FindNamespaces(mf, name); + cmGlobalGenerator* gg = dependee->GetMakefile()->GetGlobalGenerator(); + std::vector namespaces = this->FindNamespaces(gg, name); int targetOccurrences = (int)namespaces.size(); if (targetOccurrences == 1) @@ -287,10 +290,9 @@ void cmExportBuildFileGenerator //---------------------------------------------------------------------------- std::vector cmExportBuildFileGenerator -::FindNamespaces(cmMakefile* mf, const std::string& name) +::FindNamespaces(cmGlobalGenerator* gg, const std::string& name) { std::vector namespaces; - cmGlobalGenerator* gg = mf->GetGlobalGenerator(); std::map& exportSets = gg->GetBuildExportSets(); diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h index 16695f1b9..c7d317fdb 100644 --- a/Source/cmExportBuildFileGenerator.h +++ b/Source/cmExportBuildFileGenerator.h @@ -54,7 +54,6 @@ protected: std::vector &missingTargets); virtual void HandleMissingTarget(std::string& link_libs, std::vector& missingTargets, - cmMakefile* mf, cmTarget* depender, cmTarget* dependee); @@ -72,7 +71,7 @@ protected: const std::string& config); std::vector - FindNamespaces(cmMakefile* mf, const std::string& name); + FindNamespaces(cmGlobalGenerator* gg, const std::string& name); std::vector Targets; cmExportSet *ExportSet; diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 09855422d..192a93279 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -661,7 +661,6 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input, { std::string namespacedTarget; this->HandleMissingTarget(namespacedTarget, missingTargets, - target->Target->GetMakefile(), target->Target, tgt->Target); if (!namespacedTarget.empty()) { diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index 3280a03ff..e1ff83da2 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -119,7 +119,6 @@ protected: * export set. */ virtual void HandleMissingTarget(std::string& link_libs, std::vector& missingTargets, - cmMakefile* mf, cmTarget* depender, cmTarget* dependee) = 0; void PopulateInterfaceProperty(const std::string&, diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 67697f8ad..48f92b089 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -455,10 +455,11 @@ cmExportInstallFileGenerator void cmExportInstallFileGenerator::HandleMissingTarget( std::string& link_libs, std::vector& missingTargets, - cmMakefile* mf, cmTarget* depender, cmTarget* dependee) + cmTarget* depender, cmTarget* dependee) { const std::string name = dependee->GetName(); - std::vector namespaces = this->FindNamespaces(mf, name); + cmGlobalGenerator* gg = dependee->GetMakefile()->GetGlobalGenerator(); + std::vector namespaces = this->FindNamespaces(gg, name); int targetOccurrences = (int)namespaces.size(); if (targetOccurrences == 1) { @@ -479,10 +480,9 @@ cmExportInstallFileGenerator::HandleMissingTarget( //---------------------------------------------------------------------------- std::vector cmExportInstallFileGenerator -::FindNamespaces(cmMakefile* mf, const std::string& name) +::FindNamespaces(cmGlobalGenerator* gg, const std::string& name) { std::vector namespaces; - cmGlobalGenerator* gg = mf->GetGlobalGenerator(); const cmExportSetMap& exportSets = gg->GetExportSets(); for(cmExportSetMap::const_iterator expIt = exportSets.begin(); diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index b06fee541..b1fa70e78 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -57,7 +57,6 @@ protected: std::vector &missingTargets); virtual void HandleMissingTarget(std::string& link_libs, std::vector& missingTargets, - cmMakefile* mf, cmTarget* depender, cmTarget* dependee); @@ -67,7 +66,7 @@ protected: cmTarget* dependee, int occurrences); - std::vector FindNamespaces(cmMakefile* mf, + std::vector FindNamespaces(cmGlobalGenerator* gg, const std::string& name); diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h index 19d802418..50c318768 100644 --- a/Source/cmExportTryCompileFileGenerator.h +++ b/Source/cmExportTryCompileFileGenerator.h @@ -37,7 +37,6 @@ protected: std::vector&) {} virtual void HandleMissingTarget(std::string&, std::vector&, - cmMakefile*, cmTarget*, cmTarget*) {}