summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDFCompilerFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/HDFCompilerFlags.cmake')
-rw-r--r--config/cmake/HDFCompilerFlags.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 106d6d7..d658c48 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -208,6 +208,11 @@ if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
set (H5_CFLAGS4 "${H5_CFLAGS4} -Wattribute-alias -Wcast-align=strict -Wshift-overflow=2 -Wno-suggest-attribute=cold -Wno-suggest-attribute=malloc")
endif ()
+ # Append more extra warning flags that only gcc 9.x+ know about
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
+ set (H5_CFLAGS4 "${H5_CFLAGS4} Wattribute-alias=2 -Wmissing-profile")
+ endif ()
+
endif ()
#-----------------------------------------------------------------------------