From 7b85938973782ec6d09b1debe6ad48d3ba887683 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 16 Jun 2014 09:49:13 -0400 Subject: [PATCH] cmComputeTargetDepends: Remove unused 'linking' argument The AddInterfaceDepends method is never called with a non-true value for its 'linking' argument. Drop it. --- Source/cmComputeTargetDepends.cxx | 9 +++------ Source/cmComputeTargetDepends.h | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index f28217fc5..8e75807a8 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -261,8 +261,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index) if(emitted.insert(*lib).second) { this->AddTargetDepend(depender_index, *lib, true); - this->AddInterfaceDepends(depender_index, *lib, - true, emitted); + this->AddInterfaceDepends(depender_index, *lib, emitted); } } } @@ -304,8 +303,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index, if(emitted.insert(*lib).second) { this->AddTargetDepend(depender_index, *lib, true); - this->AddInterfaceDepends(depender_index, *lib, - true, emitted); + this->AddInterfaceDepends(depender_index, *lib, emitted); } } } @@ -314,7 +312,6 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index, //---------------------------------------------------------------------------- void cmComputeTargetDepends::AddInterfaceDepends(int depender_index, const std::string& dependee_name, - bool linking, std::set &emitted) { cmTarget const* depender = this->Targets[depender_index]; @@ -323,7 +320,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index, // Skip targets that will not really be linked. This is probably a // name conflict between an external library and an executable // within the project. - if(linking && dependee && + if(dependee && dependee->GetType() == cmTarget::EXECUTABLE && !dependee->IsExecutableWithExports()) { diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h index 755381635..b99199f6f 100644 --- a/Source/cmComputeTargetDepends.h +++ b/Source/cmComputeTargetDepends.h @@ -53,7 +53,7 @@ private: bool ComputeFinalDepends(cmComputeComponentGraph const& ccg); void AddInterfaceDepends(int depender_index, const std::string& dependee_name, - bool linking, std::set &emitted); + std::set &emitted); void AddInterfaceDepends(int depender_index, cmTarget const* dependee, const std::string& config, std::set &emitted);