aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeOptions.txt
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-07-22 21:29:37 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-07-26 15:13:38 +0000
commit3467b98eb72f8971c83b25b920419b8d0d49016a (patch)
tree6fd905a74275159e42c590ed480b14ad2d3a309c /CMakeOptions.txt
parent925e01b23fd5aad2fa929fafd894128a88832e74 (diff)
CMake: Make LTO default off, restrict to release build
Link Time Optimizations increases build time a lot so restrict this optimization to release builds. Follow our build bots and make this option default off. Also LTO requires CMake >= 3.9 so make the LTO CMake option universally conditional on that requirement.
Diffstat (limited to 'CMakeOptions.txt')
-rw-r--r--CMakeOptions.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/CMakeOptions.txt b/CMakeOptions.txt
index 1beeb99f56..7296f16b01 100644
--- a/CMakeOptions.txt
+++ b/CMakeOptions.txt
@@ -63,10 +63,8 @@ else()
option(ENABLE_COMPILER_COLOR_DIAGNOSTICS "Always enable the compiler's color diagnostic output" OFF)
endif()
-if(WIN32)
- option(ENABLE_LTO "Improves performance using Link Time Optimization" ON)
-elseif(CMAKE_VERSION VERSION_GREATER "3.8.99")
- option(ENABLE_LTO "Improves performance using Link Time Optimization" OFF)
+if(CMAKE_VERSION VERSION_GREATER "3.8.99")
+ option(ENABLE_LTO "Use Link Time Optimization (release configuration only)" OFF)
endif()
if(WIN32)