summaryrefslogtreecommitdiff
path: root/Source/cmAddCustomCommandCommand.cxx
diff options
context:
space:
mode:
authorEd Branch <brance@mail.utexas.edu>2017-01-13 20:01:17 -0600
committerEd Branch <brance@mail.utexas.edu>2017-01-13 20:02:16 -0600
commit7c8ab7ddc8944152a1344c43acbb8c57fa2d398a (patch)
treee74c16ab04cd0961e5ca032ba99c45087dbd0dec /Source/cmAddCustomCommandCommand.cxx
parenteee51e24d2290771ad3dded566ef897243f21331 (diff)
downloadcmake-7c8ab7ddc8944152a1344c43acbb8c57fa2d398a.tar.gz
add_custom_{command,target}: Add COMMAND_EXPAND_LISTS option
This option allows lists generated by generator expressions to be expanded. Closes: #15935
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 620de31d33..a100617275 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -36,6 +36,7 @@ bool cmAddCustomCommandCommand::InitialPass(
bool verbatim = false;
bool append = false;
bool uses_terminal = false;
+ bool command_expand_lists = false;
std::string implicit_depends_lang;
cmCustomCommand::ImplicitDependsList implicit_depends;
@@ -92,6 +93,8 @@ bool cmAddCustomCommandCommand::InitialPass(
append = true;
} else if (copy == "USES_TERMINAL") {
uses_terminal = true;
+ } else if (copy == "COMMAND_EXPAND_LISTS") {
+ command_expand_lists = true;
} else if (copy == "TARGET") {
doing = doing_target;
} else if (copy == "ARGS") {
@@ -281,12 +284,14 @@ bool cmAddCustomCommandCommand::InitialPass(
std::vector<std::string> no_depends;
this->Makefile->AddCustomCommandToTarget(
target, byproducts, no_depends, commandLines, cctype, comment,
- working.c_str(), escapeOldStyle, uses_terminal, depfile);
+ working.c_str(), escapeOldStyle, uses_terminal, depfile,
+ command_expand_lists);
} else if (target.empty()) {
// Target is empty, use the output.
this->Makefile->AddCustomCommandToOutput(
output, byproducts, depends, main_dependency, commandLines, comment,
- working.c_str(), false, escapeOldStyle, uses_terminal, depfile);
+ working.c_str(), false, escapeOldStyle, uses_terminal,
+ command_expand_lists, depfile);
// Add implicit dependency scanning requests if any were given.
if (!implicit_depends.empty()) {