summaryrefslogtreecommitdiff
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-05 14:58:16 -0400
committerBrad King <brad.king@kitware.com>2016-08-09 14:36:04 -0400
commita88c99f1bc301276a1780fec683d5061ca13f66f (patch)
tree0af89fda0902140e8dc1a821dbf5f3e094a3951c /Source/cmGlobalNinjaGenerator.cxx
parent4689d16e8aa90e57a8456357251b6575131529d7 (diff)
downloadcmake-a88c99f1bc301276a1780fec683d5061ca13f66f.tar.gz
Ninja: Simplify computation of GLOBAL_TARGET outputs
In cmGlobalNinjaGenerator::AppendTargetOutputs we previously handled GLOBAL_TARGET outputs specially in order to avoid adding directory components to the output. However, this is not necessary because cmNinjaTargetGenerator::New already filters out copies of these targets that are not at the top level. Instead we can simply follow the same output computation code path as UTILITY targets.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 44418f2d85..afd43b8dc1 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -867,6 +867,7 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs(
break;
}
case cmState::OBJECT_LIBRARY:
+ case cmState::GLOBAL_TARGET:
case cmState::UTILITY: {
std::string path =
target->GetLocalGenerator()->GetCurrentBinaryDirectory() +
@@ -875,12 +876,6 @@ void cmGlobalNinjaGenerator::AppendTargetOutputs(
break;
}
- case cmState::GLOBAL_TARGET:
- // Always use the target in HOME instead of an unused duplicate in a
- // subdirectory.
- outputs.push_back(this->NinjaOutputPath(target->GetName()));
- break;
-
default:
return;
}