From 7481945993563d93d8a605ef6cb5a7d0683fb047 Mon Sep 17 00:00:00 2001 From: Xphalnos <164882787+Xphalnos@users.noreply.github.com> Date: Sat, 3 Aug 2024 14:28:37 +0200 Subject: [PATCH] Adding CMAKE_INTERPROCEDURAL_OPTIMIZATION --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90ba4d83a..bacf3d4ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,10 @@ function(create_target_directory_groups target_name) endforeach() endfunction() +# enable link time optimization for release builds +set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON) +set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ON) + # Setup a custom clang-format target (if clang-format can be found) that will run # against all the src files. This should be used before making a pull request. if (CLANG_FORMAT)