diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2020-05-18 19:28:51 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2020-05-19 02:35:33 (GMT) |
commit | db685bb8e3029790a36c1ce6feaf2d1ddde013c2 (patch) | |
tree | f2bce9aea95b24d35b0903291a494684fbebb29b /config/gnu-cxxflags | |
parent | 03ee8c1546d3849326929c444151cc11809e047d (diff) | |
download | hdf5-db685bb8e3029790a36c1ce6feaf2d1ddde013c2.zip hdf5-db685bb8e3029790a36c1ce6feaf2d1ddde013c2.tar.gz hdf5-db685bb8e3029790a36c1ce6feaf2d1ddde013c2.tar.bz2 |
Revise gnu-*flags and cmake/HDF*CompilerFlags.cmake files to add warning
flags for GCC compilers version 4.8 and above.
Removed files from gnu-warnings that only apply to versions < 4.8.
Consolidated warnings from versions < 4.8 that apply to versions >= 4.8
into the 4.8 warnings files.
Diffstat (limited to 'config/gnu-cxxflags')
-rw-r--r-- | config/gnu-cxxflags | 67 |
1 files changed, 9 insertions, 58 deletions
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index b2ef36d..44cbc69 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -180,82 +180,33 @@ if test "X-g++" = "X-$cxx_vendor"; then # General # ########### - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -o $cxx_vers_major -gt 4; then + # Add various general warning flags in gnu-warnings for gcc versions 4.8 and later. + if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8 -o $cxx_vers_major -ge 5; then H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-general)" H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-general)" - fi ###################### # Developer warnings # ###################### - NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general) - DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general) + NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general) + DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general) + + fi ####################### # gcc 4 special cases # ####################### - # GCC 4.2 through 4.6 - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -le 6; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.2-4.6)" - fi - - # GCC 4.2 through 4.3 - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -le 3; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.2-4.3)" - fi - - # GCC 4.5 through 4.6 - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -le 6; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.5-4.6)" - fi - - # GCC 4.2 through 4.4 - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2 -a $cxx_vers_major -eq 4 -a $cxx_vers_minor -le 4; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.2-4.4)" - fi - - # GCC 4.2 through the end of GCC 4 series - if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 2; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.2-4.last)" + # GCC 4.8 through the end of GCC 4 series + if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then + H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8-4.last)" fi ############################# # Version-specific warnings # ############################# - # gcc >= 4.3 - if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 3; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.3)" - fi - - # gcc >= 4.4 - if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 4; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.4)" - fi - - # gcc >= 4.5 - if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 5; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.5)" - #DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.5)" - #NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.5)" - fi - - # gcc >= 4.6 - if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 6; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.6)" - DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.6)" - NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.6)" - fi - - # gcc >= 4.7 - if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 7; then - H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.7)" - DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.7)" - NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.7)" - fi - # gcc >= 4.8 if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8)" |