فهرست منبع

Merge topic 'tutorial-fix-ipo'

058511c6b6 Tutorial: Update IPO example in Step 6

Acked-by: Kitware Robot <[email protected]>
Merge-request: !11316
Brad King 2 روز پیش
والد
کامیت
a3267f6c6b

+ 2 - 1
Help/guide/tutorial/Complete/TutorialProject/CMakeLists.txt

@@ -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()
 

+ 2 - 1
Help/guide/tutorial/Step10/TutorialProject/CMakeLists.txt

@@ -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()
 

+ 2 - 1
Help/guide/tutorial/Step11/TutorialProject/CMakeLists.txt

@@ -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()
 

+ 3 - 1
Help/guide/tutorial/Step6/CMakeLists.txt

@@ -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)

+ 2 - 1
Help/guide/tutorial/Step7/CMakeLists.txt

@@ -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()
 

+ 2 - 1
Help/guide/tutorial/Step8/CMakeLists.txt

@@ -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()
 

+ 2 - 1
Help/guide/tutorial/Step9/CMakeLists.txt

@@ -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()