[CMake] Specifying different flags for debug/release mode

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Mon Dec 10 09:18:23 EST 2007


> Von: Pau Garcia i Quiles
> Quoting Christian Ehrlicher
> 
> > Hi,
> >
> > ist there something like target_link_libraries(debug fooD.lib   
> > release foo.lib) possible for flags?
> > It's needed to make Qt plugins work (yes, you can't properly build   
> > Qt plugins on windows with cmake).
> 
>  From http://www.cmake.org/Wiki/CMake_Useful_Variables
> 
> CMAKE_BUILD_TYPE
>   Choose the type of build. CMake has default flags for these:
> None (CMAKE_C_FLAGS or CMAKE_CXX_FLAGS used)
> Debug (CMAKE_C_FLAGS_DEBUG or CMAKE_CXX_FLAGS_DEBUG)
> Release (CMAKE_C_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELEASE)
> RelWithDebInfo (CMAKE_C_FLAGS_RELWITHDEBINFO or
> CMAKE_CXX_FLAGS_RELWITHDEBINFO

This does not help much/ I'm currently using this hack.
The problem is that it's not permanent. And the other one is that imho FindQt4.cmake should handle this.
See
http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/FindKDE4Internal.cmake?r1=733507&r2=734116
http://www.cmake.org/pipermail/cmake/2007-November/017541.html

Therefore I'm looking for an easier solution to solve this.

Christian


-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


More information about the CMake mailing list