path: root/mkspecs/features/default_pre.prf
diff options
authorJoerg Bornemann <>2019-09-12 10:27:16 +0200
committerJoerg Bornemann <>2019-09-18 08:24:38 +0200
commit1456b8091a681316f0e6256554fd138c6399f564 (patch)
tree240b0abad07e80f1aea92a36fd31727dba99e32a /mkspecs/features/default_pre.prf
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 <>
Diffstat (limited to 'mkspecs/features/default_pre.prf')
1 files changed, 6 insertions, 0 deletions
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index 1c24bf071a..b2629d04c0 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -26,4 +26,10 @@ CONFIG = \
+CONFIG(debug, debug|release) {
+} else {