From: Matthias Maier Date: Sat, 26 Nov 2022 15:51:40 +0000 (-0600) Subject: CMake: ensure that macro/function definitions are lowercase X-Git-Tag: v9.5.0-rc1~805^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0486455d47c18f98ba4a45de3103d1530f9573dd;p=dealii.git CMake: ensure that macro/function definitions are lowercase --- diff --git a/contrib/utilities/lowercase_cmake b/contrib/utilities/lowercase_cmake index d216d48712..fb0dbdf77c 100755 --- a/contrib/utilities/lowercase_cmake +++ b/contrib/utilities/lowercase_cmake @@ -47,10 +47,21 @@ collect_function_names | while read command ; do done > "${SED_FILE}" # -# Add rules to ensure that else() and endif() do not contain a statement. +# Add rules to ensure that else(), endif(), enmacro(), enfunction() +# statements do not contain a parameter. # -echo 's/else([^)]*)/else()/gI' > "${SED_FILE}" -echo 's/endif([^)]*)/endif()/gI' > "${SED_FILE}" + +echo 's/else([^)]*)/else()/gI' >> "${SED_FILE}" +echo 's/endif([^)]*)/endif()/gI' >> "${SED_FILE}" +echo 's/endmacro([^)]*)/endmacro()/gI' >> "${SED_FILE}" +echo 's/endfunction([^)]*)/endfunction()/gI' >> "${SED_FILE}" + +# +# Add rules to ensure that all macro definitions are lowercase. +# + +echo 's/macro\(\s*\)(\(\S*\)/macro\1(\L\2\E/gI' >> "${SED_FILE}" +echo 's/function\(\s*\)(\(\S*\)/function\1(\L\2\E/gI' >> "${SED_FILE}" # # Apply rules file to all CMake files: