From bfb231a8cb777469beb75a744b5777119df16b12 Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Wed, 2 Oct 2024 16:53:23 +0200 Subject: [PATCH] Improve parallel compilation We observed many warnings about serial compilations of e.g. LTRANS jobs, which is fixed hereby. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fba7a4d07..01c7c0542 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,10 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) # Enable folders for IDEs set_property(GLOBAL PROPERTY USE_FOLDERS ON) +# Enable LTO (link time optimization) for the project +set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=auto") + # --------------------------------------------------- # Other configuration options # ---------------------------------------------------