[CMake] Quoted String

Alexander.Camek at elektrobit.com Alexander.Camek at elektrobit.com
Tue Jul 31 06:30:56 EDT 2007


Hi List,

I want to add a definition to the compiler, so I do an ADD_DEFINITIONS().
The defintion I want to add is a quoted string which should be parsed with leading and ending ".
So I tried to escape it with \, but this doesn't also work.

It should look like ADD_DEFINITIONS(-DPPATH="${path_to_somewhere}"), and then in the used c file the preprocessor will parse PPATH to "/path_to_somewhere".
But it currently pares it wihtout the quote sign. In the c file it will be used as a char*, so the quotes are important.

How can this be done?

Thnaks for your help.

Greetings

Alexander


----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.



More information about the CMake mailing list