diff options
author | Ed Branch <brance@mail.utexas.edu> | 2017-01-14 02:01:17 (GMT) |
---|---|---|
committer | Ed Branch <brance@mail.utexas.edu> | 2017-01-14 02:02:16 (GMT) |
commit | 7c8ab7ddc8944152a1344c43acbb8c57fa2d398a (patch) | |
tree | e74c16ab04cd0961e5ca032ba99c45087dbd0dec /Source/cmAddCustomCommandCommand.cxx | |
parent | eee51e24d2290771ad3dded566ef897243f21331 (diff) | |
download | CMake-7c8ab7ddc8944152a1344c43acbb8c57fa2d398a.zip CMake-7c8ab7ddc8944152a1344c43acbb8c57fa2d398a.tar.gz CMake-7c8ab7ddc8944152a1344c43acbb8c57fa2d398a.tar.bz2 |
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.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 620de31..a100617 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()) { |