[cmake-developers] Passing lists with generator expression through add_custom_command
Brad King
brad.king at kitware.com
Tue Aug 15 10:48:52 EDT 2017
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
More information about the cmake-developers
mailing list