Hi,

I'm trying to set a define so that it can be used as string-literal in
C++ code using add_definitions. This:

add_definition( -DMYFOO=\"BAR BAZ\" )

works fine on linux, but breaks with MSVC6 on windows. I always thought
I understood cmake's quoting rules, but apparently I'm wrong :(

I've already tried:
add_definition( -DMYFOO=\\\"BAR BAZ\\\" )

What I didn't think of trying when I was at the machine is
add_definition( -DMYFOO=\\"BAR BAZ\\" )

Would that be the correct one? Or do I need even more \?

Andreas

-- 
You had some happiness once, but your parents moved away, and you had to
leave it behind.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to