summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2020-04-25 03:12:02 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2020-04-25 03:12:02 (GMT)
commit06033d1d399418a23e76a9418cc050f40782afc0 (patch)
treef646fd4374230a931d6f52065e7eff95cdcc49a7 /config/cmake
parent536a8b57bcc63f69b5a66d889d126bee572f970d (diff)
parentae9dc2d5f9016ef279ca9d0ca8ad9c8416e60df9 (diff)
downloadhdf5-06033d1d399418a23e76a9418cc050f40782afc0.zip
hdf5-06033d1d399418a23e76a9418cc050f40782afc0.tar.gz
hdf5-06033d1d399418a23e76a9418cc050f40782afc0.tar.bz2
Merge pull request #2539 in HDFFV/hdf5 from ~BYRN/hdf5_merge_adb:develop to develop
* commit 'ae9dc2d5f9016ef279ca9d0ca8ad9c8416e60df9': Restrict errors to gcc 4.8 and above.
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/HDFCompilerFlags.cmake6
1 files changed, 4 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 ()