mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-25 11:19:39 +01:00
Make LTO is optional.
This commit is contained in:
parent
fd3755e35c
commit
49edef9257
@ -47,6 +47,7 @@ option(USE_NOVGUI_SCOREBOARD "Prefer non-VGUI Scoreboard when USE_VGUI is enable
|
||||
option(USE_VOICEMGR "Enable VOICE MANAGER." OFF)
|
||||
option(BUILD_CLIENT "Build client dll" ON)
|
||||
option(BUILD_SERVER "Build server dll" ON)
|
||||
option(LTO "Enable interprocedural optimization" OFF)
|
||||
option(POLLY "Enable pollyhedral optimization" OFF)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR
|
||||
@ -153,11 +154,13 @@ if(VITA)
|
||||
add_compile_options(-fno-use-cxa-atexit)
|
||||
endif()
|
||||
|
||||
check_ipo_supported(RESULT HAVE_LTO OUTPUT LTO_ERROR)
|
||||
if(HAVE_LTO)
|
||||
message(STATUS "IPO / LTO enabled")
|
||||
else()
|
||||
message(STATUS "IPO / LTO not supported: ${LTO_ERROR}")
|
||||
if(LTO)
|
||||
check_ipo_supported(RESULT HAVE_LTO OUTPUT LTO_ERROR)
|
||||
if(HAVE_LTO)
|
||||
message(STATUS "IPO / LTO enabled")
|
||||
else()
|
||||
message(STATUS "IPO / LTO not supported: ${LTO_ERROR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_include_file("tgmath.h" HAVE_TGMATH_H)
|
||||
|
Loading…
Reference in New Issue
Block a user