mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-24 00:54:01 +08:00
Merge pull request #2615 from buschulte/cmake-lto-support
Enable CMake LTO/IPO support (WITH_LTO option)
This commit is contained in:
@@ -99,6 +99,17 @@ if(WITH_CJSON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(WITH_LTO "Build with link time optimizations (IPO) / interprocedural optimization (IPO) enabled." ON)
|
||||
if(WITH_LTO)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT is_ipo_supported OUTPUT output)
|
||||
if(is_ipo_supported)
|
||||
set_property(TARGET common-options PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING "LTO/IPO is not supported: ${output}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# ========================================
|
||||
# Include projects
|
||||
# ========================================
|
||||
|
||||
@@ -158,6 +158,7 @@ Clients:
|
||||
Build:
|
||||
- Increased CMake minimal required version to 3.14, which is required for the
|
||||
preinstalled SQLite3 find module.
|
||||
- Add an CMake option `WITH_LTO` to enable/disable link time optimization.
|
||||
|
||||
|
||||
2.0.14 - 2021-11-17
|
||||
|
||||
Reference in New Issue
Block a user