Reduce file size by using IPO and LTO.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
cab1b57a8e
commit
9d49b4839d
|
@ -1,4 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
include(CheckIPOSupported)
|
||||
|
||||
project(pkmnLib)
|
||||
|
||||
# Enable all warnings, and make them error when occurring.
|
||||
|
@ -102,6 +104,13 @@ file(GLOB_RECURSE CORE_SRC_FILES ${FILE_SOURCE})
|
|||
add_library(pkmnLib ${LIBTYPE} ${CORE_SRC_FILES})
|
||||
target_precompile_headers(pkmnLib PUBLIC src/Precompiled.hxx)
|
||||
|
||||
# If interprocedural optimization is available, apply it
|
||||
check_ipo_supported(RESULT IPO_SUPPORTED)
|
||||
if (IPO_SUPPORTED)
|
||||
message(STATUS "IPO / LTO enabled")
|
||||
set_property(TARGET pkmnLib PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif ()
|
||||
|
||||
SET(_LINKS CreatureLib Arbutils)
|
||||
SET(_TESTLINKS pkmnLib CreatureLib Arbutils)
|
||||
|
||||
|
|
Loading…
Reference in New Issue