mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
Cmake build: Use interprocedural optimization if possible
With gnu compilers this adds -flto and -fno-fat-lto-objects to compiler and linker flags.
This commit is contained in:
parent
89121a664a
commit
7d021a938c
6
3rdparty/hunspell/CMakeLists.txt
vendored
6
3rdparty/hunspell/CMakeLists.txt
vendored
@ -1,5 +1,9 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
|
if (POLICY CMP0069)
|
||||||
|
cmake_policy(SET CMP0069 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
project(hunspell)
|
project(hunspell)
|
||||||
|
|
||||||
|
7
3rdparty/libiconv/CMakeLists.txt
vendored
7
3rdparty/libiconv/CMakeLists.txt
vendored
@ -5,7 +5,12 @@
|
|||||||
# Please note that the package source code is licensed under its own license.
|
# Please note that the package source code is licensed under its own license.
|
||||||
|
|
||||||
project ( libiconv C )
|
project ( libiconv C )
|
||||||
cmake_minimum_required ( VERSION 2.8 )
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
|
if (POLICY CMP0069)
|
||||||
|
cmake_policy(SET CMP0069 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH .)
|
set(CMAKE_MODULE_PATH .)
|
||||||
include ( configure.cmake )
|
include ( configure.cmake )
|
||||||
|
|
||||||
|
6
3rdparty/mythes/CMakeLists.txt
vendored
6
3rdparty/mythes/CMakeLists.txt
vendored
@ -1,4 +1,8 @@
|
|||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
|
if (POLICY CMP0069)
|
||||||
|
cmake_policy(SET CMP0069 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(VERSION "1.2.5")
|
set(VERSION "1.2.5")
|
||||||
set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${VERSION})
|
set(SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/${VERSION})
|
||||||
|
7
3rdparty/zlib/CMakeLists.txt
vendored
7
3rdparty/zlib/CMakeLists.txt
vendored
@ -1,4 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 2.4.4)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
|
if (POLICY CMP0069)
|
||||||
|
cmake_policy(SET CMP0069 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||||
|
|
||||||
project(zlib C)
|
project(zlib C)
|
||||||
|
@ -81,6 +81,18 @@ if(NOT help AND NOT HELP)
|
|||||||
message(FATAL_ERROR "Exiting")
|
message(FATAL_ERROR "Exiting")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
# Enable LTO if supported
|
||||||
|
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)
|
||||||
|
else()
|
||||||
|
message(STATUS "Not setting IPO , result = ${result}, reason = ${reason}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
Loading…
Reference in New Issue
Block a user