libE57Format: Check for IPO before enabling

This commit is contained in:
Chris Hennes
2025-09-23 17:46:18 -05:00
parent 4b98ebe4f2
commit b06bafe3cd

View File

@@ -132,6 +132,12 @@ else()
add_library( E57Format STATIC ${E57Format_SOURCES})
endif()
include(CheckIPOSupported)
check_ipo_supported(RESULT ipo_ok OUTPUT ipo_msg)
if(NOT ipo_ok)
set(E57_RELEASE_LTO Off)
endif()
include( E57ExportHeader )
include( GitUpdate )