From 91cf44a0de4ac7c2bf3db26a948b5e9b95442045 Mon Sep 17 00:00:00 2001 From: redstrate Date: Mon, 11 Oct 2021 14:33:45 -0400 Subject: [PATCH] Only enable LTO on release builds --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5c24d5..2024d4d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,7 +73,9 @@ set(CROSS_LIBS add_subdirectory(extern) # enable lto -set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) +if (CMAKE_BUILD_TYPE EQUAL "Release") + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) +endif () add_subdirectory(platforms)