From 1c49c0dd4f217e267ad573642eba81072f4bcea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 25 Feb 2021 08:24:59 +0100 Subject: disble the CMAKE_INTERPROCEDURAL_OPTIMIZATION code but keep it as comment for documentation purpose. --- CMakeLists.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fe8cc12bf9..3a902e897c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,16 +87,18 @@ string(TOLOWER "${OPTIMIZE}" OPTIMIZE) message(STATUS "Optimization level: ${OPTIMIZE}") # CMAKE_INTERPROCEDURAL_OPTIMIZATION can be defined to override the default behaviour. -# We keep CMAKE_INTERPROCEDURAL_OPTIMIZATION unset (IPO disabled) for Debug builds to save -# build time during development at the cost of a bigger memory footprint at run-time. -# Note: This is has caused issues on Fedora https://bugzilla.rpmfusion.org/show_bug.cgi?id=5829 -if(NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT OPTIMIZE STREQUAL "off") - include(CheckIPOSupported) - check_ipo_supported(RESULT HAVE_IPO) - if(HAVE_IPO) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) - endif() -endif() +# We keep CMAKE_INTERPROCEDURAL_OPTIMIZATION unset (IPO disabled) to save +# build time at the cost of a bigger memory footprint at run-time. +# See https://github.com/mixxxdj/mixxx/pull/3589 for some test results +# Note: IPO has caused issues on Fedora https://bugzilla.rpmfusion.org/show_bug.cgi?id=5829 +# Uncomment the following code to enable IPO for Release builds +#if(NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT OPTIMIZE STREQUAL "off") +# include(CheckIPOSupported) +# check_ipo_supported(RESULT HAVE_IPO) +# if(HAVE_IPO) +# set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) +# endif() +#endif() if(MSVC) # Microsoft Visual Studio Compiler -- cgit v1.2.3