We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e59dbdd commit a172dc4Copy full SHA for a172dc4
cmake/link_time_optimization.cmake
@@ -3,8 +3,8 @@ include(CheckIPOSupported)
3
check_ipo_supported(RESULT ipo_supported)
4
5
function(enable_lto target_name)
6
- if (ipo_supported AND (${CMAKE_BUILD_TYPE} STREQUAL "Release"))
7
- message(STATUS "LTO enabled")
+ if (ipo_supported AND ((${CMAKE_BUILD_TYPE} STREQUAL "Release") OR (${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel")))
+ message(STATUS "LTO enabled for ${target_name}")
8
set_target_properties(${target_name} PROPERTIES
9
INTERPROCEDURAL_OPTIMIZATION TRUE)
10
else ()
0 commit comments