shithub: cstory

Download patch

ref: 413fe560e45e086841280d20f4f0d73487495062
parent: c45e888b741c00e3c9135354cbc90774528ba0ac
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Jan 22 20:00:07 EST 2020

Add LTO toggle to DoConfig CMakeLists.txt

--- a/DoConfig/CMakeLists.txt
+++ b/DoConfig/CMakeLists.txt
@@ -8,6 +8,7 @@
 	cmake_policy(SET CMP0072 NEW)
 endif()
 
+option(LTO "Enable link-time optimisation" OFF)
 option(WARNINGS "Enable common compiler warnings (for GCC-compatible compilers and MSVC only)" OFF)
 option(WARNINGS_ALL "Enable ALL compiler warnings (for Clang and MSVC only)" OFF)
 option(WARNINGS_FATAL "Stop compilation on any compiler warning (for GCC-compatible compilers and MSVC only)" OFF)
@@ -140,7 +141,7 @@
 endif()
 
 # Enable link-time optimisation if available
-if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+if(LTO)
 	if((${CMAKE_VERSION} VERSION_EQUAL 3.9) OR (${CMAKE_VERSION} VERSION_GREATER 3.9))
 		include(CheckIPOSupported)
 		check_ipo_supported(RESULT result)
--