From 48cf015906e34ea0f8a388fd3a0e53ec082546f2 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 21 Aug 2020 08:40:54 +0200 Subject: CMake: Implement configure -optimize-size This configure switch controls the feature 'optimize_size'. This isn't merely a mapping to CMAKE_BUILD_TYPE=MinSizeRel, because we potentially want to combine -optimize-size with -force-debug-info, which maps to CMAKE_BUILD_CONFIG=RelWithDebInfo. Task-number: QTBUG-85373 Change-Id: I1a9343ebc54816f52e90e9d33ea3df4c99b1ec9f Reviewed-by: Alexandru Croitor --- configure.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.cmake') diff --git a/configure.cmake b/configure.cmake index 283bb94ed4..f6863d01fe 100644 --- a/configure.cmake +++ b/configure.cmake @@ -415,6 +415,12 @@ qt_feature("optimize_debug" CONDITION NOT MSVC AND NOT CLANG AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release ) AND TEST_optimize_debug ) qt_feature_config("optimize_debug" QMAKE_PRIVATE_CONFIG) +qt_feature("optimize_size" + LABEL "Optimize release build for size" + AUTODETECT OFF + CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release +) +qt_feature_config("optimize_size" QMAKE_PRIVATE_CONFIG) qt_feature("pkg-config" PUBLIC LABEL "Using pkg-config" AUTODETECT NOT APPLE AND NOT WIN32 -- cgit v1.2.3