I'm using qmake
and Visual Studio. In release build qmake adds /GL and /O2 flags to all projects, and I need to remove those two flags for certain libraries within my whole Qt project. Is there a way?
I had a similar problem and I solved it by adding the following directive in the .pro file:
QMAKE_CXXFLAGS_RELEASE -= -g
Observe the _RELEASE suffix, otherwise don't work.