From: Matthias Maier Date: Sat, 26 Nov 2022 14:10:24 +0000 (-0600) Subject: CMake: Bugfix: Allow again to override the entire external feature detection X-Git-Tag: v9.5.0-rc1~795^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45216ea03d96505c6b80c97375f322ae4a05d2fc;p=dealii.git CMake: Bugfix: Allow again to override the entire external feature detection --- 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)