add_definitions( -DSTORE="XYZ" )<div><br></div><div>should do what you want.</div><div><br></div><div>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.<br>
<br></div><div>What version of CMake are you using?</div><div>What OS and compiler?</div><div><br></div><div><br><div class="gmail_quote">On Fri, Mar 4, 2011 at 2:00 AM, Ashish Mahamuni <span dir="ltr"><<a href="mailto:mahamuni.ashish@gmail.com">mahamuni.ashish@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am using cmake 2.8 version.<div><br></div><div>My cmake contains following statements.</div><div><br></div><div>cmake_policy(SET CMP0005 NEW)</div>
<div><div>add_definitions( </div><div><span style="white-space:pre-wrap">        </span> -DSTORE="\"XYZ\""</div>
<div>)</div></div><div><br></div><div>I am using VS 8 (2005). cmake writes the build file(vcproj) successfully without any warning </div><div><br></div><div>When I see, vcproj. It contains </div><div><br></div><div>\&quot;\&qout;XYZ\&quot;\&qout;</div>
<div><br></div><div>So basically, my C file expects macro as "XYZ", but its receiving ""XYZ""</div><div><br></div><div>I want cmake to write </div><div><br></div><div>&quot;\&qout;XYZ\&quot;&qout;</div>
<div><br></div><div>in my vcproj file. </div><div><br></div><div>I tried different combinations of "" but no luck.</div><div><br></div><div>any help? </div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>