summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-03 12:46:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-09-03 12:47:33 (GMT)
commit0b6a00741935c8b458bc4039828eafd8bf555bf2 (patch)
tree22e32ce46c0fa90ae078697401aec4b988631ed4 /Source
parentc86c5003521c58eff5bd3ab53d135172ccb62d4c (diff)
parent2a6471dd7bf3aa694a9a2bc7f554478d6fdcf8f5 (diff)
downloadCMake-0b6a00741935c8b458bc4039828eafd8bf555bf2.zip
CMake-0b6a00741935c8b458bc4039828eafd8bf555bf2.tar.gz
CMake-0b6a00741935c8b458bc4039828eafd8bf555bf2.tar.bz2
Merge topic 'ninja-multi-automoc-regression'
2a6471dd7b Merge branch 'master' into ninja-multi-automoc-regression a9fd3a107d Ninja Multi-Config: Fix dependencies of utility targets f1199bdc96 Ninja Multi-Config: Fix cleaning of utility targets with commands 657047cd24 Ninja Multi-Config: Fix clean:all target c35d1927a5 Tests: Pass additional Qt information to Ninja and NMC tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5177
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);