From 35405a198ae5477b8d8b4733a841b239e71e0d8d Mon Sep 17 00:00:00 2001 From: Samuel Debionne Date: Tue, 15 Feb 2022 11:35:30 +0100 Subject: [PATCH] [CMAKE] Build with LTO only in release builds --- detectors/simulator/src/CMakeLists.txt | 6 +++--- processings/cuda/src/CMakeLists.txt | 2 +- processings/legacy/src/CMakeLists.txt | 2 +- processings/smx/src/CMakeLists.txt | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/detectors/simulator/src/CMakeLists.txt b/detectors/simulator/src/CMakeLists.txt index 7d1e1171..9a4f0d46 100644 --- a/detectors/simulator/src/CMakeLists.txt +++ b/detectors/simulator/src/CMakeLists.txt @@ -11,7 +11,7 @@ add_library(simulator SHARED # Set compile and link properties set_target_properties(simulator PROPERTIES - INTERPROCEDURAL_OPTIMIZATION ON + INTERPROCEDURAL_OPTIMIZATION_RELEASE ON CXX_VISIBILITY_PRESET hidden VISIBLITY_INLINES_HIDDEN hidden ) @@ -53,7 +53,7 @@ target_link_libraries(simulator_ctrl ) set_target_properties(simulator_ctrl PROPERTIES - INTERPROCEDURAL_OPTIMIZATION ON + INTERPROCEDURAL_OPTIMIZATION_RELEASE ON CXX_VISIBILITY_PRESET hidden VISIBLITY_INLINES_HIDDEN hidden ) @@ -78,7 +78,7 @@ target_link_libraries(simulator_recv ) set_target_properties(simulator_recv PROPERTIES - INTERPROCEDURAL_OPTIMIZATION ON + INTERPROCEDURAL_OPTIMIZATION_RELEASE ON CXX_VISIBILITY_PRESET hidden VISIBLITY_INLINES_HIDDEN hidden ) diff --git a/processings/cuda/src/CMakeLists.txt b/processings/cuda/src/CMakeLists.txt index fca9e6d8..be6e3811 100644 --- a/processings/cuda/src/CMakeLists.txt +++ b/processings/cuda/src/CMakeLists.txt @@ -10,7 +10,7 @@ add_library(pipeline_cuda SHARED # Set compile and link properties set_target_properties(pipeline_cuda PROPERTIES - INTERPROCEDURAL_OPTIMIZATION ON + INTERPROCEDURAL_OPTIMIZATION_RELEASE ON CXX_VISIBILITY_PRESET hidden VISIBLITY_INLINES_HIDDEN hidden ) diff --git a/processings/legacy/src/CMakeLists.txt b/processings/legacy/src/CMakeLists.txt index 38c12a30..711cea0e 100644 --- a/processings/legacy/src/CMakeLists.txt +++ b/processings/legacy/src/CMakeLists.txt @@ -10,7 +10,7 @@ add_library(pipeline_legacy SHARED # Set compile and link properties set_target_properties(pipeline_legacy PROPERTIES - INTERPROCEDURAL_OPTIMIZATION ON + INTERPROCEDURAL_OPTIMIZATION_RELEASE ON CXX_VISIBILITY_PRESET hidden VISIBLITY_INLINES_HIDDEN hidden ) diff --git a/processings/smx/src/CMakeLists.txt b/processings/smx/src/CMakeLists.txt index 98c3cc15..dc5528ab 100644 --- a/processings/smx/src/CMakeLists.txt +++ b/processings/smx/src/CMakeLists.txt @@ -10,7 +10,7 @@ add_library(pipeline_smx SHARED # Set compile and link properties set_target_properties(pipeline_smx PROPERTIES - INTERPROCEDURAL_OPTIMIZATION ON + INTERPROCEDURAL_OPTIMIZATION_RELEASE ON CXX_VISIBILITY_PRESET hidden VISIBLITY_INLINES_HIDDEN hidden ) @@ -49,4 +49,4 @@ install( ) set (PROJECT_LIBRARIES lima_core pipeline_smx) -include(PackageConfig) \ No newline at end of file +include(PackageConfig) -- GitLab