summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_vcproj.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-09-12 10:27:16 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-09-18 08:24:38 +0200
commit1456b8091a681316f0e6256554fd138c6399f564 (patch)
tree240b0abad07e80f1aea92a36fd31727dba99e32a /qmake/generators/win32/msvc_vcproj.cpp
parent983cfc773d1f24badbdeafd6fbbb2a5940c6f614 (diff)
Make it possible to undefine NDEBUG for nmake and VS projects
For nmake and VS projects we added the NDEBUG define for the release configuration unconditionally within the qmake generators. To undefine it, users had to use a nasty work-around. Now, define NDEBUG within the MSVC mkspecs. In order to do that we introduce the DEFINES_RELEASE and DEFINES_DEBUG variables that are merged into DEFINES in default_pre.prf. Users can unset NDEBUG by writing DEFINES -= NDEBUG in their .pro file. Note that DEFINES_RELEASE and DEFINES_DEBUG are merged in default_pre.prf in order to give extra compilers (like moc) the chance to see the fully resolved DEFINES variable. This is different from the QMAKE_CFLAGS_(DEBUG|RELEASE) variables that get merged in default_post.prf. Fixes: QTBUG-78071 Change-Id: I381770a1d2f974fbae9b09a2254e3f2fc7842b68 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'qmake/generators/win32/msvc_vcproj.cpp')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index b6f7f20564..df4876ace7 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1038,9 +1038,6 @@ void VcprojGenerator::initConfiguration()
initDeploymentTool();
initWinDeployQtTool();
initPreLinkEventTools();
-
- if (!isDebug)
- conf.compiler.PreprocessorDefinitions += "NDEBUG";
}
void VcprojGenerator::initCompilerTool()