[CMake] setting defines using CMAKE_CXX_FLAGS

Bill Lorensen bill.lorensen at gmail.com
Mon Nov 26 14:52:42 EST 2007


Try

SET( CMAKE_CXX_FLAGS "-D DEF1 -D DEF2 -D DEF3 -D DEF4")


On Nov 26, 2007 2:03 PM, Jesse Corrington <jesse.corrington at gmail.com>
wrote:

> I am using CMAKE_CXX_FLAGS to set defines because I want to be able to set
> different ones for debug and release using CMAKE_CXX_FLAGS_DEBUG/RELEASE,
> which the other add define command doesn't seem to support. What I am doing
> doesn't seem to be working. Here is what I have:
>
> SET( CMAKE_CXX_FLAGS
>     -D DEF1
>     -D DEF2
>     -D DEF3
>     -D DEF4
>
> when I open the visual studio 2005 project file and look under the
> preprocessor setting I see the defines like this:
>
> ";_WANT_MEMPOOL_OPTIMIZATION;-D;_HAS_NETWORK;-D;_WATCH_FILESYTEM;-D;_CRT_SECURE_NO_DEPRECATE;-D;USE_PCH"
>
>
> How can I make this work correctly.
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071126/e91f0ea3/attachment.html


More information about the CMake mailing list