summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-10-07 19:27:27 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-08 16:20:34 (GMT)
commit953f4d503d0fce45de3f8b4f2087b1739a3a94a3 (patch)
treef532fecc427c4768455d2ac4ec7dba310ec6a437 /Source
parent0090a11a42c83897e05b09d5381967f0200d6eb7 (diff)
downloadCMake-953f4d503d0fce45de3f8b4f2087b1739a3a94a3.zip
CMake-953f4d503d0fce45de3f8b4f2087b1739a3a94a3.tar.gz
CMake-953f4d503d0fce45de3f8b4f2087b1739a3a94a3.tar.bz2
cmMakefile: Consolidate CreateGenerated{Outputs,Byproducts}
The implementations of these two methods are now identical, so combine them.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx16
-rw-r--r--Source/cmMakefile.h1
2 files changed, 3 insertions, 14 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4470193..9286e93 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1102,7 +1102,7 @@ cmTarget* cmMakefile::AddCustomCommandToTarget(
}
// Always create the byproduct sources and mark them generated.
- this->CreateGeneratedByproducts(byproducts);
+ this->CreateGeneratedOutputs(byproducts);
// Strings could be moved into the callback function with C++14.
cm::optional<std::string> commentStr = MakeOptionalString(comment);
@@ -1161,7 +1161,7 @@ void cmMakefile::AddCustomCommandToOutput(
// Always create the output sources and mark them generated.
this->CreateGeneratedOutputs(outputs);
- this->CreateGeneratedByproducts(byproducts);
+ this->CreateGeneratedOutputs(byproducts);
// Strings could be moved into the callback function with C++14.
cm::optional<std::string> commentStr = MakeOptionalString(comment);
@@ -1304,7 +1304,7 @@ cmTarget* cmMakefile::AddUtilityCommand(
this->GetOrCreateGeneratedSource(force.Name);
// Always create the byproduct sources and mark them generated.
- this->CreateGeneratedByproducts(byproducts);
+ this->CreateGeneratedOutputs(byproducts);
// Strings could be moved into the callback function with C++14.
cm::optional<std::string> commentStr = MakeOptionalString(comment);
@@ -3464,16 +3464,6 @@ void cmMakefile::CreateGeneratedOutputs(
}
}
-void cmMakefile::CreateGeneratedByproducts(
- const std::vector<std::string>& byproducts)
-{
- for (std::string const& o : byproducts) {
- if (cmGeneratorExpression::Find(o) == std::string::npos) {
- this->GetOrCreateGeneratedSource(o);
- }
- }
-}
-
void cmMakefile::AddTargetObject(std::string const& tgtName,
std::string const& objFile)
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 01a9274..ecc6aab 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -1087,7 +1087,6 @@ private:
bool ValidateCustomCommand(const cmCustomCommandLines& commandLines) const;
void CreateGeneratedOutputs(const std::vector<std::string>& outputs);
- void CreateGeneratedByproducts(const std::vector<std::string>& byproducts);
std::vector<BT<GeneratorAction>> GeneratorActions;
bool GeneratorActionsInvoked = false;