diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx index c24138f55799292359eb3fa389eac1ad39258adf..cf841462182fc957a50a4c5c1d056d0de9e962bf 100644 --- a/Source/cmExportBuildFileGenerator.cxx +++ b/Source/cmExportBuildFileGenerator.cxx @@ -237,14 +237,15 @@ void cmExportBuildFileGenerator::HandleMissingTarget( std::string& link_libs, std::vector<std::string>& missingTargets, - cmTarget* depender, - cmTarget* dependee) + cmGeneratorTarget* depender, + cmGeneratorTarget* dependee) { // The target is not in the export. if(!this->AppendMode) { const std::string name = dependee->GetName(); - cmGlobalGenerator* gg = dependee->GetMakefile()->GetGlobalGenerator(); + cmGlobalGenerator* gg = + dependee->GetLocalGenerator()->GetGlobalGenerator(); std::vector<std::string> namespaces = this->FindNamespaces(gg, name); int targetOccurrences = (int)namespaces.size(); @@ -252,7 +253,7 @@ cmExportBuildFileGenerator::HandleMissingTarget( { std::string missingTarget = namespaces[0]; - missingTarget += dependee->GetExportName(); + missingTarget += dependee->Target->GetExportName(); link_libs += missingTarget; missingTargets.push_back(missingTarget); return; @@ -267,7 +268,7 @@ cmExportBuildFileGenerator::HandleMissingTarget( // Assume the target will be exported by another command. // Append it with the export namespace. link_libs += this->Namespace; - link_libs += dependee->GetExportName(); + link_libs += dependee->Target->GetExportName(); } //---------------------------------------------------------------------------- @@ -315,8 +316,8 @@ cmExportBuildFileGenerator //---------------------------------------------------------------------------- void cmExportBuildFileGenerator -::ComplainAboutMissingTarget(cmTarget* depender, - cmTarget* dependee, +::ComplainAboutMissingTarget(cmGeneratorTarget* depender, + cmGeneratorTarget* dependee, int occurrences) { if(cmSystemTools::GetErrorOccuredFlag()) diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h index c7d317fdbd1172e29596965b22eda45f56326c22..85aae2fa47ffc36a1a4a6e10446140078875e105 100644 --- a/Source/cmExportBuildFileGenerator.h +++ b/Source/cmExportBuildFileGenerator.h @@ -54,11 +54,11 @@ protected: std::vector<std::string> &missingTargets); virtual void HandleMissingTarget(std::string& link_libs, std::vector<std::string>& missingTargets, - cmTarget* depender, - cmTarget* dependee); + cmGeneratorTarget* depender, + cmGeneratorTarget* dependee); - void ComplainAboutMissingTarget(cmTarget* depender, - cmTarget* dependee, + void ComplainAboutMissingTarget(cmGeneratorTarget* depender, + cmGeneratorTarget* dependee, int occurrences); /** Fill in properties indicating built file locations. */ diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 192a93279f4abc4d545666d2b58971e8a190f93a..b597b538da1cabab5fd141673bb4572a5b989d10 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -661,7 +661,7 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input, { std::string namespacedTarget; this->HandleMissingTarget(namespacedTarget, missingTargets, - target->Target, tgt->Target); + target, tgt); if (!namespacedTarget.empty()) { input = namespacedTarget; diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h index e1ff83da2ce495a6e0b77c8a4ee4cabad7815161..be5c6f72ee8d13db217fc7ac416f1965ca553608 100644 --- a/Source/cmExportFileGenerator.h +++ b/Source/cmExportFileGenerator.h @@ -119,8 +119,8 @@ protected: * export set. */ virtual void HandleMissingTarget(std::string& link_libs, std::vector<std::string>& missingTargets, - cmTarget* depender, - cmTarget* dependee) = 0; + cmGeneratorTarget* depender, + cmGeneratorTarget* dependee) = 0; void PopulateInterfaceProperty(const std::string&, cmGeneratorTarget *target, cmGeneratorExpression::PreprocessContext, diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 48f92b089f99b61f84adef54a00328d72fdf6fd8..988b0dc0e04ea07214e507e9b5d2e5f05c47236f 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -453,19 +453,19 @@ cmExportInstallFileGenerator //---------------------------------------------------------------------------- void -cmExportInstallFileGenerator::HandleMissingTarget( - std::string& link_libs, std::vector<std::string>& missingTargets, - cmTarget* depender, cmTarget* dependee) +cmExportInstallFileGenerator::HandleMissingTarget(std::string& link_libs, + std::vector<std::string>& missingTargets, + cmGeneratorTarget* depender, cmGeneratorTarget* dependee) { const std::string name = dependee->GetName(); - cmGlobalGenerator* gg = dependee->GetMakefile()->GetGlobalGenerator(); + cmGlobalGenerator* gg = dependee->GetLocalGenerator()->GetGlobalGenerator(); std::vector<std::string> namespaces = this->FindNamespaces(gg, name); int targetOccurrences = (int)namespaces.size(); if (targetOccurrences == 1) { std::string missingTarget = namespaces[0]; - missingTarget += dependee->GetExportName(); + missingTarget += dependee->Target->GetExportName(); link_libs += missingTarget; missingTargets.push_back(missingTarget); } @@ -520,8 +520,8 @@ cmExportInstallFileGenerator //---------------------------------------------------------------------------- void cmExportInstallFileGenerator -::ComplainAboutMissingTarget(cmTarget* depender, - cmTarget* dependee, +::ComplainAboutMissingTarget(cmGeneratorTarget* depender, + cmGeneratorTarget* dependee, int occurrences) { std::ostringstream e; diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h index b1fa70e78e6b4be9ca99428dfaf7b9980f646860..13dae899643a210a1592a4f7e059847ed0517369 100644 --- a/Source/cmExportInstallFileGenerator.h +++ b/Source/cmExportInstallFileGenerator.h @@ -57,13 +57,13 @@ protected: std::vector<std::string> &missingTargets); virtual void HandleMissingTarget(std::string& link_libs, std::vector<std::string>& missingTargets, - cmTarget* depender, - cmTarget* dependee); + cmGeneratorTarget* depender, + cmGeneratorTarget* dependee); virtual void ReplaceInstallPrefix(std::string &input); - void ComplainAboutMissingTarget(cmTarget* depender, - cmTarget* dependee, + void ComplainAboutMissingTarget(cmGeneratorTarget* depender, + cmGeneratorTarget* dependee, int occurrences); std::vector<std::string> FindNamespaces(cmGlobalGenerator* gg, diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h index 50c3187680c2771587b385e6c3f365f554a58307..fc135a455e675d2f7a5d8ddef2bb75b22b705a3c 100644 --- a/Source/cmExportTryCompileFileGenerator.h +++ b/Source/cmExportTryCompileFileGenerator.h @@ -37,8 +37,8 @@ protected: std::vector<std::string>&) {} virtual void HandleMissingTarget(std::string&, std::vector<std::string>&, - cmTarget*, - cmTarget*) {} + cmGeneratorTarget*, + cmGeneratorTarget*) {} void PopulateProperties(cmGeneratorTarget const* target, ImportPropertyMap& properties,