summaryrefslogtreecommitdiffstats
path: root/configure.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-10-05 09:09:13 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-10-06 10:07:08 +0200
commit98bea5857a0b63925ebab160a717105ad6ee9445 (patch)
tree43110370aec654590229a2f77d16e42b754ac767 /configure.cmake
parent07b6d3367debd8f15974abf0f5cdf48f0fe3a536 (diff)
CMake: Introduce CMake-only optimize_full feature
Enabling it will force usage of '-O3' flag when building Qt. If the platform has no '-O3' flag, use '-O2' as a fallback. Task-number: QTBUG-86866 Change-Id: If13f7de954ba5c01dc9634f06a85529828fe90a9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake
index 470e4ab0a6..46a6c776c0 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -431,6 +431,13 @@ qt_feature("optimize_size"
CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release
)
qt_feature_config("optimize_size" QMAKE_PRIVATE_CONFIG)
+# special case begin
+qt_feature("optimize_full"
+ LABEL "Fully optimize release builds (-O3)"
+ AUTODETECT OFF
+)
+qt_feature_config("optimize_full" QMAKE_PRIVATE_CONFIG)
+# special case end
qt_feature("pkg-config" PUBLIC
LABEL "Using pkg-config"
AUTODETECT NOT APPLE AND NOT WIN32 AND NOT ANDROID
@@ -940,6 +947,9 @@ qt_configure_add_summary_entry(
ARGS "optimize_size"
CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release
)
+qt_configure_add_summary_entry(
+ ARGS "optimize_full"
+)
qt_configure_add_summary_entry(ARGS "shared")
qt_configure_add_summary_entry(
TYPE "firstAvailableFeature"