[CMake] Escaping semicolons in COMPILE_FLAGS on msvc
David Genest
david.genest at ubisoft.com
Mon Oct 18 12:50:40 EDT 2010
Hi,
I have tried and tried, but haven't succeeded to include a semicolon as a COMPILE_FLAGS property for a file. I turn to you for wisdom:
I need to get this as a result in the pre-processor definitions:
MYPATH=\"d:\\;.\\Lib\"
But when I use the following escape sequence in set_source_files_properties:
set_source_files_properties(source.c PROPERTIES COMPILE_FLAGS "-DMYPATH=\\\"d:\\\;.\\\\Lib\\\"")
the generated result is: MYPATH=\"d:\\";".\\Lib\"
note the quoted semicolon. Is there a quoting workaround to allow unquoted semicolons?
Thank you,
David.
More information about the CMake
mailing list