[Qt-creator] Building qtcreator from git with debug symbols and without optimizations

Coda Highland chighland at gmail.com
Fri Mar 30 03:48:17 CEST 2012


On Thu, Mar 29, 2012 at 7:40 PM, Lincoln Ramsay
<lincoln.ramsay at nokia.com> wrote:
> On 03/30/2012 07:55 AM, ext Martin Olsson wrote:
>> QUESTION #1: Is it best to create a special "build" directory outside
>> of the qt-creator git source tree or can I just run qmake inside the
>> git source tree directly?
>
> Either is fine. If you want 2 builds at the same time (release and
> debug) then you'll need to build outside the source tree. If you build
> in the tree, you have to clean out the build before you do another one.
>
>> QUESTION #2: Exactly which parameters should I pass to qmake and make
>> to create a debug build with no optimizations?
>>
>> I've tried for example:
>> git clean -dxf ; qmake -r -after CONFIG+=debug ; make -j4
>>
>> ...but this still passes -O2 (even though -g seems to be added).
>
> At a guess... you could try CONFIG-=release and CONFIG-=debug_and_release.
>
> If something is being modified late (like say, default_post.prf) then
> -after won't be enough and you'll need a hack like this.
>
> cat >force_flags.prf <<END
> CONFIG-=release
> CONFIG-=debug_and_release
> CONFIG+=debug
> END
> QMAKEFEATURES=$PWD qmake -r CONFIG+=force_flags

Might that be TOO late? I mean, debug, debug_and_release, and release
are all prf's too, so wouldn't they get applied before qmake has a
chance to process the changes to the CONFIG variable?

/s/ Adam



More information about the Qt-creator mailing list