Skip to content

Commit

Permalink
Update BaseConfig.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
beats-dh committed Oct 13, 2024
1 parent eb80b35 commit 7992289
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/modules/BaseConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function(configure_linking target_name)

if(ipo_supported)
set_property(TARGET ${target_name} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
message(STATUS "IPO/LTO enabled for target ${target_name}.")
log_option_enabled(STATUS "IPO/LTO enabled for target ${target_name}.")

if(MSVC)
target_compile_options(${target_name} PRIVATE /GL)
Expand All @@ -163,14 +163,14 @@ function(configure_linking target_name)
GCC_VERSION VERSION_GREATER_EQUAL "14" AND
GCC_VERSION VERSION_LESS "15" AND
CMAKE_BUILD_TYPE STREQUAL "Debug")
message(WARNING "LTO disabled for GCC 14 in Debug mode on Linux for target ${target_name}.")
log_option_disabled(WARNING "LTO disabled for GCC 14 in Debug mode on Linux for target ${target_name}.")
else()
target_compile_options(${target_name} PRIVATE -flto)
target_link_options(${target_name} PRIVATE -flto)
endif()
endif()
else()
message(WARNING "IPO/LTO is not supported for target ${target_name}: ${ipo_output}")
log_option_disabled(WARNING "IPO/LTO is not supported for target ${target_name}: ${ipo_output}")
endif()
endif()
endfunction()
Expand Down

0 comments on commit 7992289

Please sign in to comment.