Added GCC9 flags to CMake build

This commit is contained in:
Quincey Koziol 2019-07-02 23:49:35 -05:00
parent 3b594992d6
commit 7509c2c4fc
2 changed files with 5 additions and 1 deletions

View File

@ -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 ()
#-----------------------------------------------------------------------------

View File

@ -241,7 +241,6 @@ case "$cc_vendor-$cc_version" in
H5_CFLAGS="$H5_CFLAGS -Wattribute-alias -Wcast-align=strict -Wshift-overflow=2"
# Append warning flags that only gcc 9.x+ knows about
DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS "
H5_CFLAGS="$H5_CFLAGS -Wattribute-alias=2 -Wmissing-profile"
;;