cmake_minimum_required(VERSION 3.1)
if (POLICY CMP0069)
- cmake_policy(SET CMP0069 NEW)
+ if (LYX_DEBUG)
+ cmake_policy(SET CMP0069 OLD)
+ else()
+ cmake_policy(SET CMP0069 NEW)
+ endif()
endif()
project(hunspell)
cmake_minimum_required(VERSION 3.1)
if (POLICY CMP0069)
- cmake_policy(SET CMP0069 NEW)
+ if (LYX_DEBUG)
+ cmake_policy(SET CMP0069 OLD)
+ else()
+ cmake_policy(SET CMP0069 NEW)
+ endif()
endif()
set(VERSION "1.2.5")
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()