mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
Cmake build: Disable interprocedural optimization if debugging
This commit is contained in:
parent
992fe6561e
commit
e4d30dd7f6
6
3rdparty/hunspell/CMakeLists.txt
vendored
6
3rdparty/hunspell/CMakeLists.txt
vendored
@ -2,7 +2,11 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
if (POLICY CMP0069)
|
if (POLICY CMP0069)
|
||||||
cmake_policy(SET CMP0069 NEW)
|
if (LYX_DEBUG)
|
||||||
|
cmake_policy(SET CMP0069 OLD)
|
||||||
|
else()
|
||||||
|
cmake_policy(SET CMP0069 NEW)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(hunspell)
|
project(hunspell)
|
||||||
|
6
3rdparty/mythes/CMakeLists.txt
vendored
6
3rdparty/mythes/CMakeLists.txt
vendored
@ -1,7 +1,11 @@
|
|||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
if (POLICY CMP0069)
|
if (POLICY CMP0069)
|
||||||
cmake_policy(SET CMP0069 NEW)
|
if (LYX_DEBUG)
|
||||||
|
cmake_policy(SET CMP0069 OLD)
|
||||||
|
else()
|
||||||
|
cmake_policy(SET CMP0069 NEW)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(VERSION "1.2.5")
|
set(VERSION "1.2.5")
|
||||||
|
@ -81,16 +81,12 @@ if(NOT help AND NOT HELP)
|
|||||||
message(FATAL_ERROR "Exiting")
|
message(FATAL_ERROR "Exiting")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
# Enable LTO if supported
|
# Enable LTO if supported and not debugging
|
||||||
if (POLICY CMP0069)
|
if (POLICY CMP0069)
|
||||||
cmake_policy(SET CMP0069 NEW)
|
if (LYX_DEBUG)
|
||||||
include(CheckIPOSupported)
|
cmake_policy(SET CMP0069 OLD)
|
||||||
check_ipo_supported(RESULT result OUTPUT reason LANGUAGES CXX)
|
|
||||||
if(result)
|
|
||||||
message(STATUS "Setting IPO True")
|
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "Not setting IPO , result = ${result}, reason = ${reason}")
|
cmake_policy(SET CMP0069 NEW)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user