mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-17 03:37:08 -06:00
Compare commits
2 Commits
entity-cle
...
lto-testin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24dae98ec8 | ||
|
|
7e72febc80 |
@@ -9,6 +9,18 @@ set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) # Set CMAKE visibility policy to NEW on p
|
|||||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) # Set C and C++ symbol visibility to hide inlined functions
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) # Set C and C++ symbol visibility to hide inlined functions
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
|
# Check if link-time-optimization is supported and apply it if possible in release builds
|
||||||
|
include(CheckIPOSupported)
|
||||||
|
check_ipo_supported(RESULT supported OUTPUT error)
|
||||||
|
|
||||||
|
if(supported)
|
||||||
|
message(STATUS "IPO / LTO enabled")
|
||||||
|
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
||||||
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
|
||||||
|
else()
|
||||||
|
message(STATUS "IPO / LTO not supported: <${error}>")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Read variables from file
|
# Read variables from file
|
||||||
FILE(READ "${CMAKE_SOURCE_DIR}/CMakeVariables.txt" variables)
|
FILE(READ "${CMAKE_SOURCE_DIR}/CMakeVariables.txt" variables)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user