2022-12-22 12:19:33 +00:00
|
|
|
cmake_minimum_required(VERSION 3.22.1)
|
|
|
|
|
|
|
|
project(hydroforth)
|
|
|
|
|
2022-12-22 15:02:45 +00:00
|
|
|
include(CheckIPOSupported)
|
|
|
|
check_ipo_supported(RESULT supported OUTPUT error)
|
|
|
|
|
2022-12-22 12:19:33 +00:00
|
|
|
file(GLOB_RECURSE SOURCES ${PROJECT_SOURCE_DIR}/src/*.c)
|
|
|
|
add_executable(hydroforth ${SOURCES})
|
|
|
|
|
2022-12-22 15:02:45 +00:00
|
|
|
if( supported )
|
|
|
|
message(STATUS "IPO / LTO enabled")
|
|
|
|
set_property(TARGET hydroforth PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
|
|
|
else()
|
|
|
|
message(STATUS "IPO / LTO not supported: <${error}>")
|
|
|
|
endif()
|
|
|
|
|
2022-12-22 12:19:33 +00:00
|
|
|
target_include_directories(hydroforth PRIVATE ${PROJECT_SOURCE_DIR}/include)
|