]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: Allow again to override the entire external feature detection
authorMatthias Maier <tamiko@43-1.org>
Sat, 26 Nov 2022 14:10:24 +0000 (08:10 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 29 Nov 2022 03:10:03 +0000 (21:10 -0600)
cmake/macros/macro_configure_feature.cmake

index 0fee70a7696db7b5f77bf096e0337d363465f237..8cffd83f2c5d7fc0b6b19f562498b3a58e581348 100644 (file)
@@ -233,10 +233,14 @@ macro(configure_feature _feature)
         #
         # Second case: We are allowed to search for an external library
         #
-        if(COMMAND feature_${_feature}_find_external)
-          evaluate_expression("feature_${_feature}_find_external(FEATURE_${_feature}_EXTERNAL_FOUND)")
+        if(NOT FEATURE_${_feature}_EXTERNAL_FOUND AND NOT DEAL_II_${_feature}_FOUND)
+          if(COMMAND FEATURE_${_feature}_FIND_EXTERNAL)
+            evaluate_expression("feature_${_feature}_find_external(FEATURE_${_feature}_EXTERNAL_FOUND)")
+          else()
+            feature_find_external(${_feature} FEATURE_${_feature}_EXTERNAL_FOUND)
+          endif()
         else()
-          feature_find_external(${_feature} FEATURE_${_feature}_EXTERNAL_FOUND)
+          set(FEATURE_${_feature}_EXTERNAL_FOUND TRUE)
         endif()
 
         if(FEATURE_${_feature}_EXTERNAL_FOUND)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.