CXXFLAGS modification of Qt pro file? [duplicate] CXXFLAGS modification of Qt pro file? [duplicate] linux linux

CXXFLAGS modification of Qt pro file? [duplicate]


You were very close. What you want is:

QMAKE_CXXFLAGS += -O1

If you would like to apply flags to just the release build, then you can use this:

QMAKE_CXXFLAGS_RELEASE += -O1

You also probably want to change your condition to be a little more flexible. In summary, something like this:

*-g++* {    QMAKE_CXXFLAGS += -O1}

More in the documentation here: http://qt-project.org/doc/qt-5.0/qtdoc/qmake-variable-reference.html#qmake-cxxflags