[cmake-developers] Passing lists with generator expression through add_custom_command

Raffi Enficiaud raffi.enficiaud at mines-paris.org
Tue Aug 15 10:50:07 EDT 2017


Le 15.08.17 à 16:48, Brad King a écrit :
> On 08/13/2017 11:36 AM, Raffi Enficiaud wrote:
>>     -DALL_DEPENDENCIES="${ALL_DEPENDENCIES_FILES}"
>
> That is actually an unquoted argument whose value contains literal quotes.
> See the cmake-language(7) manual for details on the syntax.  Switch it to
>
>   "-DALL_DEPENDENCIES=${ALL_DEPENDENCIES_FILES}"
>
> to quote the argument so that add_custom_command receives it unexpanded.
> Then use the VERBATIM option to add_custom_command to make sure it is
> re-escaped for the shell properly.
>
> -Brad
>

Ahh, thanks! and sorry for the noise!

Raffi



More information about the cmake-developers mailing list