From: Matthias Maier Date: Fri, 3 Mar 2023 20:09:57 +0000 (-0600) Subject: CMake: process_feature() disallow general/optimized/debug identifiers X-Git-Tag: v9.5.0-rc1~446^2~13 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08a70cdee3060e1fb44ef4013b97960e73ab3c7f;p=dealii.git CMake: process_feature() disallow general/optimized/debug identifiers --- diff --git a/cmake/macros/macro_process_feature.cmake b/cmake/macros/macro_process_feature.cmake index a80d8778da..f986d14164 100644 --- a/cmake/macros/macro_process_feature.cmake +++ b/cmake/macros/macro_process_feature.cmake @@ -122,24 +122,24 @@ macro(process_feature _feature) elseif("${_arg}" STREQUAL "OPTIONAL") set(_required FALSE) - elseif(_arg MATCHES "^(optimized|debug|general)$" - AND "${_current_suffix}" STREQUAL "LIBRARIES") - list(APPEND _temp_${_current_suffix} ${_arg}) - else() if ("${_current_suffix}" STREQUAL "") message(FATAL_ERROR "Internal configuration error: the second " "argument to process_feature must be a keyword" ) + elseif(_arg MATCHES "^(optimized|debug|general)$") + message(FATAL_ERROR + "Internal configuration error: process_feature() does not support " + "»debug«, »optimized«, or »general« library identifiers, use the " + "appropriate keyword instead." + ) endif() mark_as_advanced(${_arg}) if("${_current_suffix}" STREQUAL "CLEAR") - if(NOT _arg MATCHES "^(optimized|debug|general)$") - list(APPEND _clear_variables_list ${_arg}) - endif() + list(APPEND _clear_variables_list ${_arg}) else()