Skip to content

Commit

Permalink
BUILD: Use LTO by default for everything but Debug builds
Browse files Browse the repository at this point in the history
Instead of relying on explicitly having to use the "Release" target, we
now enable LTO for everything but the special "Debug" target. That is,
we assume that every configuration other than "Debug" is likely meant as
some sort of release build (potentially with external flags) and thus
we want to make use of LTO.
  • Loading branch information
Krzmbrzl committed Jan 7, 2024
1 parent b5a67c0 commit 7c5a709
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ add_compile_definitions(MUMBLE_TARGET_OS="${MUMBLE_TARGET_OS}")


set(CMAKE_UNITY_BUILD_BATCH_SIZE 40)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${lto})
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${lto})
set(CMAKE_INTERPROCEDURAL_Debug OFF)

if(client OR server)
add_subdirectory(src)
Expand Down

0 comments on commit 7c5a709

Please sign in to comment.