Skip to content

Adds option COMMAND_EXPAND_LISTS to add_custom_command and add_custom_target

Ed Branch requested to merge brance/cmake:expand_custom_commands into master

This option allows lists generated by generator expressions passed as the COMMAND of add_custom_command and add_custom_target to be expanded.

This addresses the fact that the example in the [OUTPUT EXPRESIONS][1] section of the generator expression documentation gives the following example:


But this example cannot be made to work as expected when used as a custom COMMAND. This merge request allows it to work when modified as follows and when the new option is used:




Related to #14353 (closed) implementing the functionality of the module attached to the original mantis issue much more cleanly with direct support in cmake. [1]:

Merge request reports