I don't think CMAKE_BUILD_TYPE is used by the Visual Studio generators so
that would only work for Makefile based build systems.  I need a solution
that works for both Visual Studio on Windows and Makefiles on Linux.

On 12 June 2011 21:32, Raphael Kubo da Costa <kub...@gmail.com> wrote:

> Glenn Coombs <glenn.coo...@gmail.com>
> writes:
>
> > Is there a more elegant solution that I am missing ?  Ideally something
> > like:
> >
> > add_definitions(CONFIG=Debug;Release;RelWithDebInfo;MinSizeRel
> > -DGEN_OUTFILES)
> >
> > which I know doesn't exist but I really wish it did :-)
>
> Isn't it OK to just do something like:
>
>  if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseNoOutFiles")
>    add_definitions(-DGEN_OUTFILES)
>  endif ()
>
> _______________________________________________
> 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

Reply via email to