message(FATAL_ERROR "Exiting")
endif()
endif()
- # Enable LTO if supported
+ # Enable LTO if supported and not debugging
if (POLICY CMP0069)
- cmake_policy(SET CMP0069 NEW)
- include(CheckIPOSupported)
- check_ipo_supported(RESULT result OUTPUT reason LANGUAGES CXX)
- if(result)
- message(STATUS "Setting IPO True")
- set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
+ if (LYX_DEBUG)
+ cmake_policy(SET CMP0069 OLD)
else()
- message(STATUS "Not setting IPO , result = ${result}, reason = ${reason}")
+ cmake_policy(SET CMP0069 NEW)
endif()
endif()
endif()
LYX_COMBO(EXTERNAL_MYTHES "OFF := Build 3rdparty lib mytheslib" AUTO OFF ON)
# GCC specific
-LYX_OPTION(PROFILE "Build profile version" OFF GCC)
+LYX_OPTION(PROFILE "Build with options for gprof" OFF GCC)
LYX_OPTION(EXTERNAL_BOOST "Use external boost" OFF GCC)
LYX_OPTION(PROGRAM_SUFFIX "Append version suffix to binaries" ON GCC)
LYX_OPTION(DEBUG_GLIBC "Enable libstdc++ debug mode" OFF GCC)
LYX_OPTION(DEBUG_GLIBC_PEDANTIC "Enable libstdc++ pedantic debug mode" OFF GCC)
LYX_OPTION(STDLIB_DEBUG "Use debug stdlib" OFF GCC)
-LYX_OPTION(PROFILE "Build with options for gprof" OFF GCC)
# MSVC specific
LYX_OPTION(CONSOLE "Show console on Windows" ON MSVC)