From f663a08f2067f7890e4b71fd1137791a7e96c613 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 30 Oct 2024 09:51:23 +0100 Subject: [PATCH] CMake: Report success for 'separate_debug_info' where applicable Don't disable the separate_debug_info test but mark it as successful on Apple platforms and MSVC. This enables us to simplify the condition of the separate_debug_info feature. Also, we fix the error on MSVC when passing -separate-debug-info to configure. Fixes: QTBUG-108015 Pick-to: 6.8 Change-Id: Ifb1f18b2be8a0b5693a3448c1b8198f773f94ffb Reviewed-by: Alexandru Croitor Reviewed-by: Alexey Edelev --- configure.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.cmake b/configure.cmake index 5613db5c760..93f20a83d4e 100644 --- a/configure.cmake +++ b/configure.cmake @@ -331,7 +331,10 @@ int main(void) "# FIXME: qmake: ['TEMPLATE = lib', 'CONFIG += dll bsymbolic_functions', 'isEmpty(QMAKE_LFLAGS_BSYMBOLIC_FUNC): error("Nope")'] ) -if(NOT MSVC AND NOT APPLE) +if(MSVC OR APPLE) + # These platforms / toolchains support separate debug information. Skip the compile test. + set(TEST_separate_debug_info ON CACHE INTERNAL "separate debug information support") +else() qt_config_compile_test("separate_debug_info" LABEL "separate debug information support" PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/separate_debug_info" @@ -604,7 +607,7 @@ qt_feature_config("force_debug_info" QMAKE_PRIVATE_CONFIG) qt_feature("separate_debug_info" PUBLIC LABEL "Split off debug information" AUTODETECT OFF - CONDITION ( QT_FEATURE_shared ) AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release OR QT_FEATURE_force_debug_info ) AND ( MSVC OR APPLE OR TEST_separate_debug_info ) + CONDITION ( QT_FEATURE_shared ) AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release OR QT_FEATURE_force_debug_info ) AND TEST_separate_debug_info ) qt_feature_config("separate_debug_info" QMAKE_PUBLIC_QT_CONFIG) qt_feature("appstore-compliant" PUBLIC