[CMake] Problem in escape sequence while add_definition.
David Cole
david.cole at kitware.com
Fri Mar 4 05:52:19 EST 2011
add_definitions( -DSTORE="XYZ" )
should do what you want.
If you have a cmake_minimum_required of at least version 2.6, then the
cmake_policy call is unnecessary -- it is simply implied by the minimum
required version of CMake for 2.6 and later.
What version of CMake are you using?
What OS and compiler?
On Fri, Mar 4, 2011 at 2:00 AM, Ashish Mahamuni
<mahamuni.ashish at gmail.com>wrote:
> I am using cmake 2.8 version.
>
> My cmake contains following statements.
>
> cmake_policy(SET CMP0005 NEW)
> add_definitions(
> -DSTORE="\"XYZ\""
> )
>
> I am using VS 8 (2005). cmake writes the build file(vcproj) successfully
> without any warning
>
> When I see, vcproj. It contains
>
> \"\&qout;XYZ\"\&qout;
>
> So basically, my C file expects macro as "XYZ", but its receiving ""XYZ""
>
> I want cmake to write
>
> "\&qout;XYZ\"&qout;
>
> in my vcproj file.
>
> I tried different combinations of "" but no luck.
>
> any help?
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110304/71858422/attachment-0001.htm>
More information about the CMake
mailing list