From 983cfc773d1f24badbdeafd6fbbb2a5940c6f614 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 16 Sep 2019 14:55:57 +0200 Subject: Fix Vulkan SDK detection for MinGW cross-compilation We must not set QMAKE_INCDIR_VULKAN if the Vulkan SDK is installed in some default include directory. MinGW's std headers rely on #include_next, which will break if we mess with the order of default include paths. Fixes: QTBUG-76660 Change-Id: I5ee0fc4c328ff88b979a8c1c010472b3883dff8d Reviewed-by: Kai Koehne --- mkspecs/features/win32/windows_vulkan_sdk.prf | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/win32/windows_vulkan_sdk.prf b/mkspecs/features/win32/windows_vulkan_sdk.prf index 2aebbd3b25..4dc0e50090 100644 --- a/mkspecs/features/win32/windows_vulkan_sdk.prf +++ b/mkspecs/features/win32/windows_vulkan_sdk.prf @@ -3,6 +3,11 @@ isEmpty(QMAKE_INCDIR_VULKAN) { # headers are found out-of-the-box on typical Windows setups. QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include + # Do not add default include paths as that can knock std headers + # out of their stride due to their usage of #include_next. + contains(QMAKE_DEFAULT_INCDIRS, $$QMAKE_INCDIR_VULKAN): \ + QMAKE_INCDIR_VULKAN = + # Do not export the include dir but resolve it on every qmake call. QMAKE_EXPORT_INCDIR_VULKAN = - } -- cgit v1.2.3 From 1456b8091a681316f0e6256554fd138c6399f564 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 12 Sep 2019 10:27:16 +0200 Subject: 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 --- mkspecs/common/msvc-desktop.conf | 1 + mkspecs/common/winrt_winphone/qmake.conf | 1 + mkspecs/features/default_pre.prf | 6 ++++++ 3 files changed, 8 insertions(+) (limited to 'mkspecs') 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 diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf index 03fb96f2c5..e683018a81 100644 --- a/mkspecs/common/winrt_winphone/qmake.conf +++ b/mkspecs/common/winrt_winphone/qmake.conf @@ -11,6 +11,7 @@ CONFIG = package_manifest $$CONFIG incremental flat precompile_ # 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 WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN _ENABLE_EXTENDED_ALIGNED_STORAGE +DEFINES_RELEASE += NDEBUG QMAKE_COMPILER_DEFINES += _WIN32 DEPLOYMENT_PLUGIN += qwinrt 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 = \ unset(today) } +CONFIG(debug, debug|release) { + DEFINES += $$DEFINES_DEBUG +} else { + DEFINES += $$DEFINES_RELEASE +} + load(toolchain) -- cgit v1.2.3 From 90779d96adfa51a3fc00b6c0d93168b4bbfcf983 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 16 Sep 2019 13:18:23 +0200 Subject: Ignore non-existent .ui file dependencies Commit 80dea664 broke .ui files with global includes that are not part of the project, because we blindly added every file path that falls out of 'uic -d' as dependency. Introduce the extra compiler CONFIG flag dep_existing_only to bring back the old behavior that ignores non-existent dependencies and set it for uic. Change-Id: I6eaa82817c932a98ebac6d08115a9815d4b9dd21 Fixes: QTBUG-78144 Reviewed-by: Kai Koehne --- mkspecs/features/uic.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index 1cedce5ae7..a5df0c7e8d 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -9,7 +9,7 @@ uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN} uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} uic.input = FORMS uic.variable_out = GENERATED_FILES -uic.CONFIG += no_link target_predeps dep_lines +uic.CONFIG += no_link target_predeps dep_lines dep_existing_only uic.name = UIC ${QMAKE_FILE_IN} silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands QMAKE_EXTRA_COMPILERS += uic -- cgit v1.2.3