summaryrefslogtreecommitdiffstats
path: root/Source/cmAddCustomCommandCommand.cxx
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2021-11-03 04:23:03 (GMT)
committerBrad King <brad.king@kitware.com>2021-11-18 17:02:37 (GMT)
commitd0158b765b0660bcfe304830e179fa9bbdffd5d9 (patch)
tree06283349a5b741130cec4cf5e6045a94bc4b1613 /Source/cmAddCustomCommandCommand.cxx
parent2bad0145af7fab909ce9c8272b2057be52f0b40d (diff)
downloadCMake-d0158b765b0660bcfe304830e179fa9bbdffd5d9.zip
CMake-d0158b765b0660bcfe304830e179fa9bbdffd5d9.tar.gz
CMake-d0158b765b0660bcfe304830e179fa9bbdffd5d9.tar.bz2
cmMakefile: Move CMP0116 lookup into Add{Custom,Utility}Command
Avoid repeating it at every call site.
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index a7ce3a6..ff2cc3e 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -320,16 +320,15 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
if (source.empty() && output.empty()) {
// Source is empty, use the target.
std::vector<std::string> no_depends;
- mf.AddCustomCommandToTarget(
- target, byproducts, no_depends, commandLines, cctype, comment,
- working.c_str(), mf.GetPolicyStatus(cmPolicies::CMP0116), escapeOldStyle,
- uses_terminal, depfile, job_pool, command_expand_lists);
+ mf.AddCustomCommandToTarget(target, byproducts, no_depends, commandLines,
+ cctype, comment, working.c_str(),
+ escapeOldStyle, uses_terminal, depfile,
+ job_pool, command_expand_lists);
} else if (target.empty()) {
// Target is empty, use the output.
mf.AddCustomCommandToOutput(
output, byproducts, depends, main_dependency, implicit_depends,
- commandLines, comment, working.c_str(),
- mf.GetPolicyStatus(cmPolicies::CMP0116), nullptr, false, escapeOldStyle,
+ commandLines, comment, working.c_str(), nullptr, false, escapeOldStyle,
uses_terminal, command_expand_lists, depfile, job_pool);
} else if (!byproducts.empty()) {
status.SetError("BYPRODUCTS may not be specified with SOURCE signatures");
@@ -366,8 +365,7 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
// Use the old-style mode for backward compatibility.
mf.AddCustomCommandOldStyle(target, outputs, depends, source, commandLines,
- comment,
- mf.GetPolicyStatus(cmPolicies::CMP0116));
+ comment);
}
return true;