[Qt-creator] CMake + Multiple Build configuration

Gena Cid genacid at inbox.ru
Fri Nov 6 12:51:48 CET 2009


On Tuesday 27 October 2009 17:44:16 Daniel Teske wrote:
> On Wednesday 21 October 2009 16:37:16 ext Hari Sundar wrote:
> > How can I specify multiple build configurations with CMake, so that it is
> >  available within Creator. I am using v1.2.92
> >
> > When I use CMake to generate Visual Studio projects, I get 4 build
> >  configurations, release, debug, minsizedrelease, releasewithdebuginfo
> >
> > How do I get these within Creator ?
> 
> It's a little bit more complicated (and also a little bit more flexible.)
> 
> To use multiple different build configurations, I would strongly recommend
>  a different build directory per build configuration.
> 
> By default no parameters are passed to cmake, thus the default is (IIRC)
> RelWithDebInfo (which is Release with Debug Information).
> 
> To create additional buildconfigurations switch to the projects pane and
>  choose "Add" next to the "Edit BuildConfiguration" label, choose create,
>  choose a different build directory and on the second wizard page enter,
>  one of: -DCMAKE_BUILD_TYPE=None
> -DCMAKE_BUILD_TYPE=Debug
> -DCMAKE_BUILD_TYPE=Release
> -DCMAKE_BUILD_TYPE=RelWithDebInfo
> -DCMAKE_BUILD_TYPE=MinSizeRel
> into the arguments line edit.
> 
> That should work.
> 
> daniel

Hi, daniel!

I followed your advise and created 3 folders for my project (Debug, Release and RelWithDebInfo). Everything works OK - I can get three builds of my app in three separate folders. But I can't run corresponding build - only one that specified in Run Settings->Working Directory. That field always has the same value for all my builds..

P.S. I'm using latest snapshot (Nov 6 2009 at 05:01:17 from revision ee64379bdc) in Debian testing amd64.

-----|-
Гена.



More information about the Qt-creator-old mailing list