[CMake] Passing options into COMMAND inside of add_custom_target() or add_custom_command()

Kornel Benko kornel at lyx.org
Sat Jun 28 14:57:34 EDT 2014


Am Samstag, 28. Juni 2014 um 19:21:50, schrieb Hendrik Sattler <post at hendrik-sattler.de>
> >So 'ls' got '-l -h' as one paramater.
> >I would use
> >1.) -DMYTOOL_FLAGS="-lh"
> >
> >or
> >2.) -DMYTOOL_FLAGS="-l;-h"
> 
> Or maybe escaping on the shell as
> "-DMYTOOL_FLAGS=-l -h"
> also works?

This is identical to -DMYTOOL_FLAGS="-l -h". The shell simply removes quotes. The command
(in this case cmake) get this (as one) parameter '-DMYTOOL_FLAGS=-l -h' including the blank.
So it should not work.

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140628/a3f46019/attachment.sig>


More information about the CMake mailing list