Skip to content
Snippets Groups Projects
Commit f95ed638 authored by Soeren Peters's avatar Soeren Peters
Browse files

Make LTO optional

parent 573b1f59
No related branches found
No related tags found
1 merge request!34Add new library, which contains the calculation of the macroscopic quantities and a general cumulant computation. (Closes #13)
......@@ -153,15 +153,17 @@ function(vf_add_library)
PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# link time optimization
if(NOT ${ARG_BUILDTYPE} MATCHES binary)
include(CheckIPOSupported)
check_ipo_supported(RESULT ipo_supported OUTPUT ipo_error LANGUAGES CXX)
if( ipo_supported )
status_lib("IPO / LTO enabled")
set_target_properties(${library_name} PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
status_lib("IPO / LTO not supported: <${ipo_error}>")
if(BUILD_VF_LTO)
if(NOT ${ARG_BUILDTYPE} MATCHES binary)
include(CheckIPOSupported)
check_ipo_supported(RESULT ipo_supported OUTPUT ipo_error LANGUAGES CXX)
if( ipo_supported )
status_lib("IPO / LTO enabled")
set_target_properties(${library_name} PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
status_lib("IPO / LTO not supported: <${ipo_error}>")
endif()
endif()
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment