diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-09-12 10:27:16 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-09-18 08:24:38 +0200 |
commit | 1456b8091a681316f0e6256554fd138c6399f564 (patch) | |
tree | 240b0abad07e80f1aea92a36fd31727dba99e32a /mkspecs/common/msvc-desktop.conf | |
parent | 983cfc773d1f24badbdeafd6fbbb2a5940c6f614 (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 'mkspecs/common/msvc-desktop.conf')
-rw-r--r-- | mkspecs/common/msvc-desktop.conf | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index 0b94e5a3f5..034fd3b305 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -19,6 +19,7 @@ CONFIG += flat debug_and_release debug_and_release_target precom # MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without # _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility. DEFINES += UNICODE _UNICODE WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE +DEFINES_RELEASE += NDEBUG QMAKE_COMPILER_DEFINES += _WIN32 contains(QMAKE_TARGET.arch, x86_64) { DEFINES += WIN64 |