mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-28 03:38:43 -06:00
cmMakefile: Consolidate CreateGenerated{Outputs,Byproducts}
The implementations of these two methods are now identical, so combine them.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user