From b99321b78bd011ff9b184e9c28d4b01e14e23969 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 26 Feb 2020 13:38:23 +0100 Subject: CMake: Port the 'force_debug_info' feature This feature is read-only and is ON if CMAKE_BUILD_TYPE is RelWithDebInfo or if that value is in CMAKE_CONFIGURATION_TYPES. It mainly exists for the qmake support. Change-Id: I25cb57e832dcfcab100834a104b1a3d34f01086b Reviewed-by: Simon Hausmann Reviewed-by: Alexandru Croitor --- configure.cmake | 5 +++++ util/cmake/configurejson2cmake.py | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.cmake b/configure.cmake index c204a836e2..9610d37576 100644 --- a/configure.cmake +++ b/configure.cmake @@ -362,6 +362,11 @@ qt_feature("debug_and_release" PUBLIC CONDITION QT_GENERATOR_IS_MULTI_CONFIG ) qt_feature_config("debug_and_release" QMAKE_PUBLIC_QT_CONFIG) +qt_feature("force_debug_info" + LABEL "Add debug info in release mode" + AUTODETECT CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo OR RelWithDebInfo IN_LIST CMAKE_CONFIGURATION_TYPES +) +qt_feature_config("force_debug_info" QMAKE_PRIVATE_CONFIG) qt_feature("appstore-compliant" PUBLIC LABEL "App store compliance" PURPOSE "Disables code that is not allowed in platform app stores" diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 2c65703d59..f5062d4953 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -709,7 +709,9 @@ def parseFeature(ctx, feature, data, cm_fh): "doubleconversion": None, "enable_gdb_index": None, "enable_new_dtags": None, - "force_debug_info": None, + "force_debug_info": { + "autoDetect": "CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo OR RelWithDebInfo IN_LIST CMAKE_CONFIGURATION_TYPES" + }, "framework": {"condition": "APPLE AND BUILD_SHARED_LIBS"}, "gc_binaries": None, "gcc-sysroot": None, -- cgit v1.2.3