It sounds like you may have re-discovered this bug in a slightly different form:<div><a href="http://public.kitware.com/Bug/view.php?id=8165">http://public.kitware.com/Bug/view.php?id=8165</a></div><div><br></div><div>The "correct" fix for both would be generic enough to properly quote any /D args as needed for the rc compiler, the midl compiler and the C++ compiler.</div>
<div><br></div><div>However, this issue is halfway down the queue on the priority scale: not sure when we'll get to it.<br><br></div><div>I think to get it working the way you'd like is going to require cmake source code changes.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div><div><br><div class="gmail_quote">On Sat, Mar 6, 2010 at 8:31 PM, Tony Bridges <span dir="ltr"><<a href="mailto:abridges@rim.com">abridges@rim.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Setting a value into the CMAKE_RC_FLAGS field in the
CMakeCache.txt file has no effect.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I am using the Visual Studio 2005 generator, although I have
seen this also reported against VS2009. I am using cmake 2.8 (from source
with the midl quoting patch applied)</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Instead of obeying _<i>RC</i>_FLAGS, any values set in CMAKE_CXX_FLAGS
are passed to RC.EXE. This presents a problem when attempting to pass a
string. The resource compiler requires the quotes around a string to be
quoted, like this </p>
<p class="MsoNormal"> /D__USER__=\”$(username)\”</p>
<p class="MsoNormal">but passing this same string to the compiler causes it to
choke. Conversely, excluding the backslash is valid for the compiler, </p>
<p class="MsoNormal"> /D__USER__=”$(username)”</p>
<p class="MsoNormal">but causes the resource compiler to complain of “unknown
command”.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Is there a way to isolate arguments for the resource
compiler only ?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Many thanks</p>
<p class="MsoNormal">/tony</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
--------------------------------------------------------------------- <br>
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
</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>