Skip to content
Snippets Groups Projects
Commit a92c400f authored by Dominik Thoennes's avatar Dominik Thoennes
Browse files

Merge branch 'lto' into 'master'

Check whether LTO works before enabling it

Closes #140

See merge request walberla/walberla!395
parents db81c63a d37a1961
No related merge requests found
......@@ -1112,7 +1112,14 @@ endif()
##
############################################################################################################################
if ( WALBERLA_BUILD_WITH_LTO )
set( CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE )
cmake_policy( SET CMP0069 NEW )
include( CheckIPOSupported )
check_ipo_supported( RESULT LTO_SUPPORTED LANGUAGES CXX )
if( LTO_SUPPORTED )
set( CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE )
else()
message( WARNING "Link-time optimization is not supported with this compiler" )
endif()
endif ( )
############################################################################################################################
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment