Enable LTO if available
This commit is contained in:
parent
190b64633f
commit
ff05fee2bf
|
|
@ -11,6 +11,12 @@ include(identity)
|
|||
|
||||
project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES C)
|
||||
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT IPO_SUPPORTED)
|
||||
if(IPO_SUPPORTED)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
option(BUILD_SERVER "Build dedicated server" ON)
|
||||
option(BUILD_CLIENT "Build client" ON)
|
||||
option(BUILD_RENDERER_GL1 "Build GL1 renderer" ON)
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ set(USE_OPENAL_DLOPEN OFF CACHE INTERNAL "")
|
|||
set(BUILD_GAME_LIBRARIES OFF CACHE INTERNAL "")
|
||||
set(USE_HTTP OFF CACHE INTERNAL "")
|
||||
|
||||
# Disable LTO since the libraries Emscripten provides aren't LTO enabled
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
|
||||
|
||||
list(APPEND CLIENT_LINK_OPTIONS
|
||||
-sTOTAL_MEMORY=256MB
|
||||
-sSTACK_SIZE=5MB
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user