Disable LTO on debug builds
This commit is contained in:
parent
9c29b25ab8
commit
a3b0561d51
|
|
@ -11,12 +11,6 @@ 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)
|
||||
|
|
@ -48,6 +42,14 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
|||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
# Try to enable LTO by default
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT IPO_SUPPORTED)
|
||||
if(IPO_SUPPORTED)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user