Change compilation flags in Qt under Mac OS X?

Posted by Lior on Stack Overflow See other posts from Stack Overflow or by Lior
Published on 2009-09-17T17:50:41Z Indexed on 2010/03/20 15:01 UTC
Read the original article Hit count: 361

Filed under:
|
|

I installed Qt for Mac, and am compiling my Qt project after adding in the .Pro file

CONFIG(release, debug|release):QMAKE_CXXFLAGS += -O3 -fomit-frame-pointer

to optimize for speed.

However, I always see that the command where g++ is ran, includes -Os, which optimizes for size. I would like to remove it.

I tried several approaches, like

CONFIG(release, debug|release):QMAKE_CFLAGS_RELEASE -= -Os
CONFIG(release, debug|release):QMAKE_CXXFLAGS -= -Os

and

CONFIG(release, debug|release):QMAKE_CXXFLAGS = -O3 -fomit-frame-pointer
CONFIG(release, debug|release):QMAKE_CFLAGS_RELEASE = -O3 -fomit-frame-pointer
(no +)

But nothing. -Os ALWAYS appear.

How do I change this?

I found the qmake.conf file under /usr/local/QT4.5/mkspecs. It includes a mac-g++.conf file, but I cannot change it, and chmod doesn't work: chmod: mac-g++.conf: Operation not permitted

Any ideas?

© Stack Overflow or respective owner

Related posts about qt

Related posts about qt4