summaryrefslogtreecommitdiffstats
path: root/Source/cmCommonTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r--Source/cmCommonTargetGenerator.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index 1924235..2d6ce98 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -4,6 +4,7 @@
#include <algorithm>
#include <sstream>
+#include <type_traits>
#include <utility>
#include <cm/string_view>
@@ -172,13 +173,7 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories(
this->GeneratorTarget->GetLinkInformation(config)) {
std::vector<cmGeneratorTarget const*> targets;
for (auto const& item : cli->GetItems()) {
- targets.push_back(item.Target);
- }
- for (auto const* target : cli->GetObjectLibrariesLinked()) {
- targets.push_back(target);
- }
-
- for (auto const* linkee : targets) {
+ auto const* linkee = item.Target;
if (linkee &&
!linkee->IsImported()
// Skip targets that build after this one in a static lib cycle.