diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2021-02-25 08:24:59 +0100 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2021-02-25 08:24:59 +0100 |
commit | 1c49c0dd4f217e267ad573642eba81072f4bcea6 (patch) | |
tree | 16d7102153d29e5b9f358adcf5496b1a98dbe9ff /CMakeLists.txt | |
parent | e77ac2c74c923e27ceaf9789cb36e2623f7c76e9 (diff) |
disble the CMAKE_INTERPROCEDURAL_OPTIMIZATION code but keep it as comment for documentation purpose.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 12 insertions, 10 deletions
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 |