mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 20:45:47 +00:00
Cmake build: Disable interprocedural optimization if debugging
This commit is contained in:
parent
992fe6561e
commit
e4d30dd7f6
4
3rdparty/hunspell/CMakeLists.txt
vendored
4
3rdparty/hunspell/CMakeLists.txt
vendored
@ -2,8 +2,12 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
if (POLICY CMP0069)
|
||||
if (LYX_DEBUG)
|
||||
cmake_policy(SET CMP0069 OLD)
|
||||
else()
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
project(hunspell)
|
||||
|
||||
|
4
3rdparty/mythes/CMakeLists.txt
vendored
4
3rdparty/mythes/CMakeLists.txt
vendored
@ -1,8 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
if (POLICY CMP0069)
|
||||
if (LYX_DEBUG)
|
||||
cmake_policy(SET CMP0069 OLD)
|
||||
else()
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(VERSION "1.2.5")
|
||||
set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${VERSION})
|
||||
|
@ -81,16 +81,12 @@ if(NOT help AND NOT HELP)
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user