diff options
author | Brad King <brad.king@kitware.com> | 2017-01-17 14:04:50 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-17 14:04:50 (GMT) |
commit | aa63ab6d3e7bf320f17a5364a596355e3ab976e0 (patch) | |
tree | 96a77958dda05beadf4c18f89cf52a77ac76d4b4 /Help/command | |
parent | 020cba316bb3a4d33da5108ab10d2c06b4712427 (diff) | |
parent | 7c8ab7ddc8944152a1344c43acbb8c57fa2d398a (diff) | |
download | CMake-aa63ab6d3e7bf320f17a5364a596355e3ab976e0.zip CMake-aa63ab6d3e7bf320f17a5364a596355e3ab976e0.tar.gz CMake-aa63ab6d3e7bf320f17a5364a596355e3ab976e0.tar.bz2 |
Merge topic 'expand_custom_commands'
7c8ab7dd add_custom_{command,target}: Add COMMAND_EXPAND_LISTS option
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/add_custom_command.rst | 11 | ||||
-rw-r--r-- | Help/command/add_custom_target.rst | 9 |
2 files changed, 19 insertions, 1 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 4ab4298..80e7edf 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -21,7 +21,8 @@ The first signature is for adding a custom command to produce an output:: [WORKING_DIRECTORY dir] [COMMENT comment] [DEPFILE depfile] - [VERBATIM] [APPEND] [USES_TERMINAL]) + [VERBATIM] [APPEND] [USES_TERMINAL] + [COMMAND_EXPAND_LISTS]) This defines a command to generate specified ``OUTPUT`` file(s). A target created in the same directory (``CMakeLists.txt`` file) @@ -122,6 +123,14 @@ The options are: Arguments to ``DEPENDS`` may use :manual:`generator expressions <cmake-generator-expressions(7)>`. +``COMMAND_EXPAND_LISTS`` + Lists in ``COMMAND`` arguments will be expanded, including those + created with + :manual:`generator expressions <cmake-generator-expressions(7)>`, + allowing ``COMMAND`` arguments such as + ``${CC} "-I$<JOIN:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>,;-I>" foo.cc`` + to be properly expanded. + ``IMPLICIT_DEPENDS`` Request scanning of implicit dependencies of an input file. The language given specifies the programming language whose diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst index 6980d61..bd61c8b 100644 --- a/Help/command/add_custom_target.rst +++ b/Help/command/add_custom_target.rst @@ -12,6 +12,7 @@ Add a target with no output so it will always be built. [WORKING_DIRECTORY dir] [COMMENT comment] [VERBATIM] [USES_TERMINAL] + [COMMAND_EXPAND_LISTS] [SOURCES src1 [src2...]]) Adds a target with the given name that executes the given commands. @@ -88,6 +89,14 @@ The options are: Use the :command:`add_dependencies` command to add dependencies on other targets. +``COMMAND_EXPAND_LISTS`` + Lists in ``COMMAND`` arguments will be expanded, including those + created with + :manual:`generator expressions <cmake-generator-expressions(7)>`, + allowing ``COMMAND`` arguments such as + ``${CC} "-I$<JOIN:$<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>,;-I>" foo.cc`` + to be properly expanded. + ``SOURCES`` Specify additional source files to be included in the custom target. Specified source files will be added to IDE project files for |