diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-04-24 21:25:51 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:37:19 (GMT) |
commit | 5383152d67ed94054621cb90b85489647e80d737 (patch) | |
tree | 89a0305cf81d6023efed89b02f3b0fd7b8f99035 /config | |
parent | 1cff43a935dde0b5dc3751746af031ddf9c3a532 (diff) | |
download | hdf5-5383152d67ed94054621cb90b85489647e80d737.zip hdf5-5383152d67ed94054621cb90b85489647e80d737.tar.gz hdf5-5383152d67ed94054621cb90b85489647e80d737.tar.bz2 |
Restrict errors to gcc 4.8 and above.
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/HDFCompilerFlags.cmake | 6 | ||||
-rw-r--r-- | config/gnu-flags | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 02bc8b1..6dbaa64 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -96,6 +96,8 @@ if (NOT MSVC) # Add general CFlags for GCC versions 4.2 and above if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2) ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general") + endif () + if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8) ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general") endif () # gcc automatically inlines based on the optimization level @@ -140,12 +142,12 @@ if (NOT MSVC) ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.last") endif () - # Append warning flags for gcc 4.2-4.3 + # Append warning flags for gcc 4.2-4.3 if (CMAKE_C_COMPILER_VERSION VERSION_LESS_EQUAL 4.3 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2) ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.3") endif () - # Append warning flags for gcc 4.2-4.4 + # Append warning flags for gcc 4.2-4.4 if (CMAKE_C_COMPILER_VERSION VERSION_LESS_EQUAL 4.4 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.2) ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.2-4.4") endif () diff --git a/config/gnu-flags b/config/gnu-flags index 84aa645..5c88309 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -190,6 +190,8 @@ if test "X-gcc" = "X-$cc_vendor"; then if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -gt 4; then H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments general)" + fi + if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8 -o $cc_vers_major -gt 4; then H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-general)" fi |