cmMakefile: Move CMP0116 lookup into Add{Custom,Utility}Command

Avoid repeating it at every call site.
This commit is contained in:
NAKAMURA Takumi
2021-11-03 13:23:03 +09:00
committed by Brad King
parent 2bad0145af
commit d0158b765b
8 changed files with 58 additions and 75 deletions
+16 -18
View File
@@ -169,8 +169,7 @@ public:
const std::string& target, const std::vector<std::string>& byproducts,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines, cmCustomCommandType type,
const char* comment, const char* workingDir,
cmPolicies::PolicyStatus cmp0116, bool escapeOldStyle = true,
const char* comment, const char* workingDir, bool escapeOldStyle = true,
bool uses_terminal = false, const std::string& depfile = "",
const std::string& job_pool = "", bool command_expand_lists = false,
bool stdPipesUTF8 = false);
@@ -187,11 +186,11 @@ public:
const std::string& output, const std::vector<std::string>& depends,
const std::string& main_dependency,
const cmCustomCommandLines& commandLines, const char* comment,
const char* workingDir, cmPolicies::PolicyStatus cmp0116,
const CommandSourceCallback& callback = nullptr, bool replace = false,
bool escapeOldStyle = true, bool uses_terminal = false,
bool command_expand_lists = false, const std::string& depfile = "",
const std::string& job_pool = "", bool stdPipesUTF8 = false);
const char* workingDir, const CommandSourceCallback& callback = nullptr,
bool replace = false, bool escapeOldStyle = true,
bool uses_terminal = false, bool command_expand_lists = false,
const std::string& depfile = "", const std::string& job_pool = "",
bool stdPipesUTF8 = false);
void AddCustomCommandToOutput(
const std::vector<std::string>& outputs,
const std::vector<std::string>& byproducts,
@@ -199,18 +198,17 @@ public:
const std::string& main_dependency,
const cmImplicitDependsList& implicit_depends,
const cmCustomCommandLines& commandLines, const char* comment,
const char* workingDir, cmPolicies::PolicyStatus cmp0116,
const CommandSourceCallback& callback = nullptr, bool replace = false,
bool escapeOldStyle = true, bool uses_terminal = false,
bool command_expand_lists = false, const std::string& depfile = "",
const std::string& job_pool = "", bool stdPipesUTF8 = false);
const char* workingDir, const CommandSourceCallback& callback = nullptr,
bool replace = false, bool escapeOldStyle = true,
bool uses_terminal = false, bool command_expand_lists = false,
const std::string& depfile = "", const std::string& job_pool = "",
bool stdPipesUTF8 = false);
void AddCustomCommandOldStyle(const std::string& target,
const std::vector<std::string>& outputs,
const std::vector<std::string>& depends,
const std::string& source,
const cmCustomCommandLines& commandLines,
const char* comment,
cmPolicies::PolicyStatus cmp0116);
const char* comment);
void AppendCustomCommandToOutput(
const std::string& output, const std::vector<std::string>& depends,
const cmImplicitDependsList& implicit_depends,
@@ -256,10 +254,10 @@ public:
const std::string& utilityName, bool excludeFromAll,
const char* workingDir, const std::vector<std::string>& byproducts,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines, cmPolicies::PolicyStatus cmp0116,
bool escapeOldStyle = true, const char* comment = nullptr,
bool uses_terminal = false, bool command_expand_lists = false,
const std::string& job_pool = "", bool stdPipesUTF8 = false);
const cmCustomCommandLines& commandLines, bool escapeOldStyle = true,
const char* comment = nullptr, bool uses_terminal = false,
bool command_expand_lists = false, const std::string& job_pool = "",
bool stdPipesUTF8 = false);
/**
* Add a subdirectory to the build.