Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
4.8.0
-
None
-
msvc2010
Description
By default win32-msvc2010/qmake.conf has QMAKE_CFLAGS_DEBUG set to "-Zi -MDd" and Qt compiles ok and vcxproj files generated are ok. However, if you set it to "-Zi -Mdd -Od" (disable optimization) the resulting vcxproj file leads to an incorrect vcxproj file as the optimization level remains O2.
The fix is in msbuild_objectmodel.cpp: the static function "toString(optimizeOption option)" needs to return "Disabled" if option is "optimizeDisabled":
static inline QString toString(optimizeOption option) { switch (option) { case optimizeMinSpace: return "MinSpace"; case optimizeMaxSpeed: return "MaxSpeed"; case optimizeDisabled: // fixes problem where -Od is ignored return "Disabled"; } return QString(); }