[CMake] When is escaping of space characters in parameters really needed?

SF Markus Elfring elfring at users.sourceforge.net
Tue May 12 03:24:27 EDT 2015


Hello,

I would like to construct a custom command for the tool "Latexmk".
http://www.cmake.org/cmake/help/v3.2/command/add_custom_command.html

The corresponding Perl script can handle a parameter like "pdflatex".

If I omit the parameter "VERBATIM", the current CMake software
will add backslashes before space characters.

Example:
… -pdf -pdflatex='/usr/bin/pdflatex\ -halt-on-error\ --shell-escape\ %O\ %S' …


Can such "an adjustment" of the really desired string value
be avoided anyhow?
Should the value work also without the shown escaping?

Regards,
Markus


More information about the CMake mailing list