Where in Qt Creator do I pass arguments to a compiler?

smallB picture smallB · Nov 2, 2011 · Viewed 33k times · Source

Where in Qt Creator do I pass arguments to a compiler?
It isn't really that obvious.

Answer

mbx picture mbx · Nov 2, 2011

Depending on your build system it's either in your qmake project file(.pro, standard for new projects) or in one of the CMake files (CMakeLists.txt, used by KDE and several other projects).

Using .pro:

QMAKE_CXXFLAGS += -O2

Using CMake:

set( CMAKE_CXX_FLAGS "-g -Wall")