summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2021-10-06 21:24:22 (GMT)
committerGitHub <noreply@github.com>2021-10-06 21:24:22 (GMT)
commit174f4275bab93e734fafd94d9b69929f3aeb963c (patch)
treec3699e3f94c4ef098e7cd94c2c93c3fc2fd39519 /config/cmake_ext_mod
parenta08059894bc85655e4ed895fd5c5f4c1ba64a2f6 (diff)
downloadhdf5-174f4275bab93e734fafd94d9b69929f3aeb963c.zip
hdf5-174f4275bab93e734fafd94d9b69929f3aeb963c.tar.gz
hdf5-174f4275bab93e734fafd94d9b69929f3aeb963c.tar.bz2
To reduce maintenance effort, delete the `noerror-` variants of the compiler flags files (#1033)
* Avoid maintenance headaches: delete the `noerror-` variants of the compiler flags files, since they essentially duplicate the `error-` files modulo the replacement of `-Werror=` with `-W` and any changes in comments. (I verified the duplication with a script.) For autoconf, reinstate the use of the `demote_errors` shell function to derive the `noerror-` content from the `error-` content. `demote_errors` replaces `-Werror=` with `-W` when `WARNINGS_AS_ERRORS` is `no`. Slightly reorder `configure.ac` so that the setting of `WARNINGS_AS_ERRORS` takes effect before the `error-` files are sourced. * Take a stab at updating the CMake files to match the changes I made to the autoconf files to remove `noerror-` files. I'm not much of a CMake user so these changes are quite rough. Looks like the duplication can be reduced with the introduction of a new macro. * Delete `noerror-` files from the MANIFEST. * Reduce duplication in the CMake files: perform the HDF5_ENABLE_WARNINGS_AS_ERRORS test once in the ADD_H5_FLAGS macro. * Add a release note.
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index ae0ebca..6da2b74 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -464,6 +464,9 @@ macro (ADD_H5_FLAGS h5_flag_var infile)
list (GET TEST_FLAG_STREAM ${line} str_flag)
string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}")
#message (TRACE "str_flag=${str_flag}")
+ if (NOT HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ string (REGEX REPLACE "-Werror=" "-W" str_flag "${str_flag}")
+ endif ()
if (str_flag)
list (APPEND ${h5_flag_var} "${str_flag}")
endif ()