summaryrefslogtreecommitdiffstats
path: root/Source/cmAddCustomCommandCommand.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-02-22 20:24:52 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-02-23 14:14:31 (GMT)
commitf01f10e8fbe2f740e210f467877f6d6b8e8d7e1f (patch)
tree068148e5d0c2cb851f875b2edc668988b613bc55 /Source/cmAddCustomCommandCommand.cxx
parent33d93089ef25d39e335ccc63c9e27c91a39e7bb1 (diff)
downloadCMake-f01f10e8fbe2f740e210f467877f6d6b8e8d7e1f.zip
CMake-f01f10e8fbe2f740e210f467877f6d6b8e8d7e1f.tar.gz
CMake-f01f10e8fbe2f740e210f467877f6d6b8e8d7e1f.tar.bz2
cmCustomCommand: Record value of CMP0116 at time of creation
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index ff2cc3e..a7ce3a6 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -320,15 +320,16 @@ 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(),
- escapeOldStyle, uses_terminal, depfile,
- job_pool, command_expand_lists);
+ 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);
} else if (target.empty()) {
// Target is empty, use the output.
mf.AddCustomCommandToOutput(
output, byproducts, depends, main_dependency, implicit_depends,
- commandLines, comment, working.c_str(), nullptr, false, escapeOldStyle,
+ commandLines, comment, working.c_str(),
+ mf.GetPolicyStatus(cmPolicies::CMP0116), 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");
@@ -365,7 +366,8 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
// Use the old-style mode for backward compatibility.
mf.AddCustomCommandOldStyle(target, outputs, depends, source, commandLines,
- comment);
+ comment,
+ mf.GetPolicyStatus(cmPolicies::CMP0116));
}
return true;