summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-05-31 21:26:50 +0200
committerGitHub <noreply@github.com>2020-05-31 21:26:50 +0200
commit8b0b80000818199ea623897b1ad3705b657983c6 (patch)
treed52100871d18e4e296c9ecf1592be0a1e175cfd3 /CMakeLists.txt
parentResolve IPO flags mismatch (diff)
downloadcuberite-8b0b80000818199ea623897b1ad3705b657983c6.tar
cuberite-8b0b80000818199ea623897b1ad3705b657983c6.tar.gz
cuberite-8b0b80000818199ea623897b1ad3705b657983c6.tar.bz2
cuberite-8b0b80000818199ea623897b1ad3705b657983c6.tar.lz
cuberite-8b0b80000818199ea623897b1ad3705b657983c6.tar.xz
cuberite-8b0b80000818199ea623897b1ad3705b657983c6.tar.zst
cuberite-8b0b80000818199ea623897b1ad3705b657983c6.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c16c0e40..6b0ce4afa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,11 +97,11 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
-# The need for speed (in Release)
-include(CheckIPOSupported)
-check_ipo_supported(RESULT IPO_SUPPORTED)
-if(IPO_SUPPORTED)
- set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
+# The need for speed (in Release):
+if(WHOLE_PROGRAM_OPTIMISATION)
+ include(CheckIPOSupported)
+ check_ipo_supported(RESULT IPO_SUPPORTED)
+ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${IPO_SUPPORTED})
endif()
# Static CRT