summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx4
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx2
2 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index ed61021..cde1972 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1214,7 +1214,8 @@ void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
for (auto const& dep_target : this->GetTargetDirectDepends(target)) {
if (!dep_target->IsInBuildSystem() ||
- (this->EnableCrossConfigBuild() && !dep_target.IsCross())) {
+ (target->GetType() != cmStateEnums::UTILITY &&
+ this->EnableCrossConfigBuild() && !dep_target.IsCross())) {
continue;
}
@@ -1910,6 +1911,7 @@ void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)
byproducts.push_back(
this->BuildAlias(GetByproductsForCleanTargetName(), config));
}
+ byproducts.emplace_back(GetByproductsForCleanTargetName());
build.Variables["TARGETS"] = cmJoin(byproducts, " ");
for (auto const& fileConfig : configs) {
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 9508bb9..ad1d5f1 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -100,6 +100,8 @@ void cmNinjaUtilityTargetGenerator::Generate(const std::string& config)
if (genTarget->Target->GetType() != cmStateEnums::GLOBAL_TARGET) {
lg->AppendTargetOutputs(genTarget, gg->GetByproductsForCleanTarget(),
config);
+ std::copy(util_outputs.begin(), util_outputs.end(),
+ std::back_inserter(gg->GetByproductsForCleanTarget()));
}
lg->AppendTargetDepends(genTarget, deps, config, config,
DependOnTargetArtifact);