This is also related to this bug: http://public.kitware.com/Bug/view.php?id=10194
The only way I worked around not being able to set RC flags for preprocessor items was to use configure_file with a header that was included by all of my .rc files. James On Mon, Mar 8, 2010 at 11:49 AM, David Cole <david.c...@kitware.com> wrote: > It sounds like you may have re-discovered this bug in a slightly different > form: > http://public.kitware.com/Bug/view.php?id=8165 > > 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. > > However, this issue is halfway down the queue on the priority scale: not > sure when we'll get to it. > > I think to get it working the way you'd like is going to require cmake > source code changes. > > > HTH, > David > > > On Sat, Mar 6, 2010 at 8:31 PM, Tony Bridges <abrid...@rim.com> wrote: > >> Setting a value into the CMAKE_RC_FLAGS field in the CMakeCache.txt file >> has no effect. >> >> >> >> 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) >> >> >> >> Instead of obeying _*RC*_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 >> >> /D__USER__=\”$(username)\” >> >> but passing this same string to the compiler causes it to choke. >> Conversely, excluding the backslash is valid for the compiler, >> >> /D__USER__=”$(username)” >> >> but causes the resource compiler to complain of “unknown command”. >> >> >> >> Is there a way to isolate arguments for the resource compiler only ? >> >> >> >> Many thanks >> >> /tony >> >> >> >> >> >> >> --------------------------------------------------------------------- >> 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. >> >> >> _______________________________________________ >> 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 >> > > > _______________________________________________ > 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 >
_______________________________________________ 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