diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-08-21 08:40:54 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-08-23 11:04:42 +0200 |
commit | 48cf015906e34ea0f8a388fd3a0e53ec082546f2 (patch) | |
tree | 44160036aa348732dadadd7a865b56d4c6df6e6d /configure.cmake | |
parent | c8fda317ea12914ee51c20fe8bd256454cdb6cfe (diff) |
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
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 |