Tutorial: Update IPO example in Step 6

This commit is contained in:
Vito Gamberini
2025-10-15 13:54:50 -04:00
committed by Brad King
parent 773cee16d4
commit 058511c6b6
7 changed files with 15 additions and 7 deletions

View File

@@ -13,9 +13,10 @@ if(TUTORIAL_ENABLE_IPO)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
message("IPO is supported, enabling IPO")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
else()
message(WARNING "IPO is not supported ${message}")
message(WARNING "IPO is not supported: ${output}")
endif()
endif()

View File

@@ -13,9 +13,10 @@ if(TUTORIAL_ENABLE_IPO)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
message("IPO is supported, enabling IPO")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
else()
message(WARNING "IPO is not supported ${message}")
message(WARNING "IPO is not supported: ${output}")
endif()
endif()

View File

@@ -13,9 +13,10 @@ if(TUTORIAL_ENABLE_IPO)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
message("IPO is supported, enabling IPO")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
else()
message(WARNING "IPO is not supported ${message}")
message(WARNING "IPO is not supported: ${output}")
endif()
endif()

View File

@@ -13,7 +13,9 @@ option(TUTORIAL_USE_STD_SQRT "Use std::sqrt" OFF)
# set(CMAKE_INTERPROCEDURAL_OPTIMIZATION True)
# Otherwise, follow the examples in the CheckIPOSupported documentation.
# Specifically, follow the documentation example to emit an error message
# if IPO is unavailable.
# if IPO is unavailable. Additionally, when IPO is available, emit a
# message indicating so (otherwise IPO has no easily visible change in
# the logs or build).
if(TUTORIAL_BUILD_UTILITIES)
add_subdirectory(Tutorial)

View File

@@ -10,9 +10,10 @@ if(TUTORIAL_ENABLE_IPO)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
message("IPO is supported, enabling IPO")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
else()
message(WARNING "IPO is not supported ${message}")
message(WARNING "IPO is not supported: ${output}")
endif()
endif()

View File

@@ -13,9 +13,10 @@ if(TUTORIAL_ENABLE_IPO)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
message("IPO is supported, enabling IPO")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
else()
message(WARNING "IPO is not supported ${message}")
message(WARNING "IPO is not supported: ${output}")
endif()
endif()

View File

@@ -12,9 +12,10 @@ if(TUTORIAL_ENABLE_IPO)
include(CheckIPOSupported)
check_ipo_supported(RESULT result OUTPUT output)
if(result)
message("IPO is supported, enabling IPO")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
else()
message(WARNING "IPO is not supported ${message}")
message(WARNING "IPO is not supported: ${output}")
endif()
endif()