From 45216ea03d96505c6b80c97375f322ae4a05d2fc Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sat, 26 Nov 2022 08:10:24 -0600 Subject: [PATCH] CMake: Bugfix: Allow again to override the entire external feature detection --- cmake/macros/macro_configure_feature.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmake/macros/macro_configure_feature.cmake b/cmake/macros/macro_configure_feature.cmake index 0fee70a769..8cffd83f2c 100644 --- a/cmake/macros/macro_configure_feature.cmake +++ b/cmake/macros/macro_configure_feature.cmake @@ -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) -- 2.39.5