From b7fc18afd8f532c233110981c2b8114ed643e896 Mon Sep 17 00:00:00 2001 From: John Tramm Date: Mon, 20 Jan 2020 18:07:22 +0000 Subject: [PATCH] Added message in cmake script to output if IPO is going to be used or not. --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f23d88fa1e..ee82b674f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,14 @@ if (NOT (CMAKE_VERSION VERSION_LESS 3.9)) check_ipo_supported(RESULT ipo_support_detected) endif() +if (ipo_support_detected) + message(STATUS "LTO/IPO support: enabled") +endif() + +if (NOT (ipo_support_detected)) + message(STATUS "LTO/IPO support: disabled") +endif() + #=============================================================================== # Set compile/link flags based on which compiler is being used #=============================================================================== @@ -331,7 +339,6 @@ set_target_properties(libopenmc PROPERTIES if(optimize) if(ipo_support_detected) set_property(TARGET libopenmc PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) - message(STATUS "LTO enabled for libopenmc") endif() endif() @@ -390,7 +397,6 @@ target_link_libraries(openmc libopenmc) if(optimize) if(ipo_support_detected) set_property(TARGET openmc PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE) - message(STATUS "LTO enabled for openmc executable") endif() endif()