build: Enable link time optimization in release builds. (#6887)
This commit is contained in:
parent
edf157200d
commit
f2e0748a22
10 changed files with 12 additions and 8 deletions
|
@ -5,6 +5,10 @@ include_directories(.)
|
|||
set_property(DIRECTORY APPEND PROPERTY
|
||||
COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG> $<$<NOT:$<CONFIG:Debug>>:NDEBUG>)
|
||||
|
||||
if (ENABLE_LTO)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
|
||||
# Set compilation flags
|
||||
if (MSVC)
|
||||
set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue