1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 09:18:54 -05:00

Enable CMAKE_INTERPROCEDURAL_OPTIMIZATION

This commit is contained in:
Kacper Michajłow 2020-11-22 04:02:39 +01:00
parent ce4f48b9bf
commit e07c67aff6
2 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,8 @@ include_guard(GLOBAL)
include(DetectArchitecture)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
if(WIN32)
add_compile_definitions(
NOMINMAX

View File

@ -77,6 +77,11 @@ if(CMAKE_BUILD_TYPE)
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
endif()
if(CMAKE_INTERPROCEDURAL_OPTIMIZATION)
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_POLICY_DEFAULT_CMP0069:STRING=NEW)
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=${CMAKE_INTERPROCEDURAL_OPTIMIZATION})
endif()
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
list(APPEND COMMON_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
if (CMAKE_LINKER)