Commit d37a1961 authored by Michael Kuron's avatar Michael Kuron
Browse files

Check whether LTO works before enabling it

parent db81c63a
Pipeline #29278 passed with stages
in 445 minutes and 35 seconds
......@@ -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 ( )
############################################################################################################################
......
Markdown is supported
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