summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-07-24 15:49:59 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-07-24 15:49:59 (GMT)
commitcfe2dc4721cfd833bc3f42ff1eaa33b51ae0d7fa (patch)
treeb9bb2f9410393f872762a19dd1b9583e86139879 /Source
parent1138907a58402f8004a6c6ff163a30b58239ece7 (diff)
downloadCMake-cfe2dc4721cfd833bc3f42ff1eaa33b51ae0d7fa.zip
CMake-cfe2dc4721cfd833bc3f42ff1eaa33b51ae0d7fa.tar.gz
CMake-cfe2dc4721cfd833bc3f42ff1eaa33b51ae0d7fa.tar.bz2
Ninja: Remove parameter default for cmNinjaTargetDepends
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx18
-rw-r--r--Source/cmGlobalNinjaGenerator.h15
-rw-r--r--Source/cmLocalNinjaGenerator.cxx19
-rw-r--r--Source/cmLocalNinjaGenerator.h8
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx7
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx3
6 files changed, 39 insertions, 31 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 786cde7..b52dd28 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1189,7 +1189,7 @@ void cmGlobalNinjaGenerator::AppendTargetDependsClosure(
// finally generate the outputs of the target itself, if applicable
cmNinjaDeps outs;
if (!omit_self) {
- this->AppendTargetOutputs(target, outs, config);
+ this->AppendTargetOutputs(target, outs, config, DependOnTargetArtifact);
}
outputs.insert(outs.begin(), outs.end());
}
@@ -1201,7 +1201,7 @@ void cmGlobalNinjaGenerator::AddTargetAlias(const std::string& alias,
std::string outputPath = this->NinjaOutputPath(alias);
std::string buildAlias = this->BuildAlias(outputPath, config);
cmNinjaDeps outputs;
- this->AppendTargetOutputs(target, outputs, config);
+ this->AppendTargetOutputs(target, outputs, config, DependOnTargetArtifact);
// Mark the target's outputs as ambiguous to ensure that no other target
// uses the output as an alias.
for (std::string const& output : outputs) {
@@ -1267,11 +1267,12 @@ void cmGlobalNinjaGenerator::WriteTargetAliases(std::ostream& os)
if (ta.second.Config == "all") {
for (auto const& config : this->CrossConfigs) {
this->AppendTargetOutputs(ta.second.GeneratorTarget,
- build.ExplicitDeps, config);
+ build.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
} else {
this->AppendTargetOutputs(ta.second.GeneratorTarget, build.ExplicitDeps,
- ta.second.Config);
+ ta.second.Config, DependOnTargetArtifact);
}
this->WriteBuild(this->EnableCrossConfigBuild() &&
(ta.second.Config == "all" ||
@@ -1299,7 +1300,8 @@ void cmGlobalNinjaGenerator::WriteTargetAliases(std::ostream& os)
build.Outputs.front() = ta.first;
build.ExplicitDeps.clear();
this->AppendTargetOutputs(ta.second.GeneratorTarget,
- build.ExplicitDeps, config);
+ build.ExplicitDeps, config,
+ DependOnTargetArtifact);
this->WriteBuild(*this->GetConfigFileStream(config), build);
}
}
@@ -1321,7 +1323,8 @@ void cmGlobalNinjaGenerator::WriteTargetAliases(std::ostream& os)
build.ExplicitDeps.clear();
for (auto const& config : this->DefaultConfigs) {
this->AppendTargetOutputs(ta.second.GeneratorTarget,
- build.ExplicitDeps, config);
+ build.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
this->WriteBuild(*this->GetDefaultFileStream(), build);
}
@@ -1358,7 +1361,8 @@ void cmGlobalNinjaGenerator::WriteFolderTargets(std::ostream& os)
configDeps.emplace_back(build.Outputs.front());
for (DirectoryTarget::Target const& t : dt.Targets) {
if (!IsExcludedFromAllInConfig(t, config)) {
- this->AppendTargetOutputs(t.GT, build.ExplicitDeps, config);
+ this->AppendTargetOutputs(t.GT, build.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
}
for (DirectoryTarget::Dir const& d : dt.Children) {
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 44e632f..10f5cf6 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -318,14 +318,13 @@ public:
virtual std::string OrderDependsTargetForTarget(
cmGeneratorTarget const* target, const std::string& config) const;
- void AppendTargetOutputs(
- cmGeneratorTarget const* target, cmNinjaDeps& outputs,
- const std::string& config,
- cmNinjaTargetDepends depends = DependOnTargetArtifact);
- void AppendTargetDepends(
- cmGeneratorTarget const* target, cmNinjaDeps& outputs,
- const std::string& config, const std::string& fileConfig,
- cmNinjaTargetDepends depends = DependOnTargetArtifact);
+ void AppendTargetOutputs(cmGeneratorTarget const* target,
+ cmNinjaDeps& outputs, const std::string& config,
+ cmNinjaTargetDepends depends);
+ void AppendTargetDepends(cmGeneratorTarget const* target,
+ cmNinjaDeps& outputs, const std::string& config,
+ const std::string& fileConfig,
+ cmNinjaTargetDepends depends);
void AppendTargetDependsClosure(cmGeneratorTarget const* target,
cmNinjaDeps& outputs,
const std::string& config);
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index aee7f45..c47a9b2 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -102,9 +102,10 @@ void cmLocalNinjaGenerator::Generate()
this->GetGlobalGenerator()->IsMultiConfig()) {
cmNinjaBuild phonyAlias("phony");
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.Outputs, "");
+ target.get(), phonyAlias.Outputs, "", DependOnTargetArtifact);
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.ExplicitDeps, config);
+ target.get(), phonyAlias.ExplicitDeps, config,
+ DependOnTargetArtifact);
this->GetGlobalNinjaGenerator()->WriteBuild(
*this->GetGlobalNinjaGenerator()->GetConfigFileStream(config),
phonyAlias);
@@ -115,11 +116,12 @@ void cmLocalNinjaGenerator::Generate()
if (!this->GetGlobalNinjaGenerator()->GetDefaultConfigs().empty()) {
cmNinjaBuild phonyAlias("phony");
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.Outputs, "");
+ target.get(), phonyAlias.Outputs, "", DependOnTargetArtifact);
for (auto const& config :
this->GetGlobalNinjaGenerator()->GetDefaultConfigs()) {
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.ExplicitDeps, config);
+ target.get(), phonyAlias.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
this->GetGlobalNinjaGenerator()->WriteBuild(
*this->GetGlobalNinjaGenerator()->GetDefaultFileStream(),
@@ -127,10 +129,11 @@ void cmLocalNinjaGenerator::Generate()
}
cmNinjaBuild phonyAlias("phony");
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.Outputs, "all");
+ target.get(), phonyAlias.Outputs, "all", DependOnTargetArtifact);
for (auto const& config : this->GetConfigNames()) {
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.ExplicitDeps, config);
+ target.get(), phonyAlias.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
this->GetGlobalNinjaGenerator()->WriteBuild(
*this->GetGlobalNinjaGenerator()->GetDefaultFileStream(),
@@ -355,8 +358,8 @@ void cmLocalNinjaGenerator::AppendTargetOutputs(cmGeneratorTarget* target,
cmNinjaDeps& outputs,
const std::string& config)
{
- this->GetGlobalNinjaGenerator()->AppendTargetOutputs(target, outputs,
- config);
+ this->GetGlobalNinjaGenerator()->AppendTargetOutputs(target, outputs, config,
+ DependOnTargetArtifact);
}
void cmLocalNinjaGenerator::AppendTargetDepends(cmGeneratorTarget* target,
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index ef160e7..73c0cde 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -66,10 +66,10 @@ public:
void AppendTargetOutputs(cmGeneratorTarget* target, cmNinjaDeps& outputs,
const std::string& config);
- void AppendTargetDepends(
- cmGeneratorTarget* target, cmNinjaDeps& outputs, const std::string& config,
- const std::string& fileConfig,
- cmNinjaTargetDepends depends = DependOnTargetArtifact);
+ void AppendTargetDepends(cmGeneratorTarget* target, cmNinjaDeps& outputs,
+ const std::string& config,
+ const std::string& fileConfig,
+ cmNinjaTargetDepends depends);
void AddCustomCommandTarget(cmCustomCommand const* cc,
cmGeneratorTarget* target);
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index de68371..924a44e 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -743,7 +743,8 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement(
// Gather order-only dependencies.
this->GetLocalGenerator()->AppendTargetDepends(
- this->GetGeneratorTarget(), build.OrderOnlyDeps, config, config);
+ this->GetGeneratorTarget(), build.OrderOnlyDeps, config, config,
+ DependOnTargetArtifact);
// Write the build statement for this target.
bool usedResponseFile = false;
@@ -1168,8 +1169,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp"));
// Gather order-only dependencies.
- this->GetLocalGenerator()->AppendTargetDepends(gt, linkBuild.OrderOnlyDeps,
- config, fileConfig);
+ this->GetLocalGenerator()->AppendTargetDepends(
+ gt, linkBuild.OrderOnlyDeps, config, fileConfig, DependOnTargetArtifact);
// Add order-only dependencies on versioning symlinks of shared libs we link.
if (!this->GeneratorTarget->IsDLLPlatform()) {
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 8d863c3..9508bb9 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -101,7 +101,8 @@ void cmNinjaUtilityTargetGenerator::Generate(const std::string& config)
lg->AppendTargetOutputs(genTarget, gg->GetByproductsForCleanTarget(),
config);
}
- lg->AppendTargetDepends(genTarget, deps, config, config);
+ lg->AppendTargetDepends(genTarget, deps, config, config,
+ DependOnTargetArtifact);
if (commands.empty()) {
phonyBuild.Comment = "Utility command for " + this->GetTargetName();