summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-06-23 00:34:47 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-06-23 00:34:47 (GMT)
commit17ae90917856e4cbab5a2f1c597197ee98802fc7 (patch)
tree36796235c2bba802a121865418b6b771f88b12bb /config
parent4e3a0c505c2501fc6b6cd95913d511c773287272 (diff)
downloadhdf5-17ae90917856e4cbab5a2f1c597197ee98802fc7.zip
hdf5-17ae90917856e4cbab5a2f1c597197ee98802fc7.tar.gz
hdf5-17ae90917856e4cbab5a2f1c597197ee98802fc7.tar.bz2
Update GCC 6 & 7 flags for CMake builds
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDFCompilerFlags.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 0a39568..4712f50 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -195,7 +195,12 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
# Append more extra warning flags that only gcc 6.x+ know about
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
- set (H5_CFLAGS4 "${H5_CFLAGS4} -Wnull-dereference -Wunused-const-variable -Wduplicated-cond -Whsa")
+ set (H5_CFLAGS4 "${H5_CFLAGS4} -Wnull-dereference -Wunused-const-variable -Wduplicated-cond -Whsa -Wnormalized")
+ endif ()
+
+ # Append more extra warning flags that only gcc 7.x+ know about
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0)
+ set (H5_CFLAGS4 "${H5_CFLAGS4} -Walloc-zero -Walloca -Wduplicated-branches -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wrestrict")
endif ()
endif ()