summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-04-07 14:37:08 (GMT)
committerGitHub <noreply@github.com>2022-04-07 14:37:08 (GMT)
commita4e833c50c002239af8c16667b1b072e6c6fa27f (patch)
treea9a5a7a595f4291f973e5783716e4e2499edd031 /config
parentdc07ef19fd055daa27026282213c63e7e74f73c2 (diff)
downloadhdf5-a4e833c50c002239af8c16667b1b072e6c6fa27f.zip
hdf5-a4e833c50c002239af8c16667b1b072e6c6fa27f.tar.gz
hdf5-a4e833c50c002239af8c16667b1b072e6c6fa27f.tar.bz2
1.12: Brings 1.12 compiler options in line with develop (#1611)
* Brings 1.12 compiler options in line with develop * Revert 'since' doxygen field in H5public.h
Diffstat (limited to 'config')
-rw-r--r--config/BlankForm4
-rw-r--r--config/clang-warnings/developer-general1
-rw-r--r--config/clang-warnings/general16
-rw-r--r--config/cmake/libh5cc.in2
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake111
-rw-r--r--config/gnu-warnings/cxx-general1
-rw-r--r--config/gnu-warnings/developer-general3
-rw-r--r--config/gnu-warnings/error-51
-rw-r--r--config/gnu-warnings/error-general1
-rw-r--r--config/gnu-warnings/general14
10 files changed, 69 insertions, 85 deletions
diff --git a/config/BlankForm b/config/BlankForm
index ce4bf53..14131b2 100644
--- a/config/BlankForm
+++ b/config/BlankForm
@@ -61,7 +61,7 @@ fi
#
# PROD_CFLAGS Flags to pass to the compiler to create a
# PROD_CPPFLAGS production version of the library. These
-# usualy exclude symbolic debugging switches
+# usually exclude symbolic debugging switches
# (like `-g') and include optimization switches
# (like `-O').
#
@@ -84,7 +84,7 @@ fi
# compiler or a descendent of gcc such as EGCS or PGCC.
#
# AM_CFLAGS Flags added directly into this variable will
-# be propogated to the compiler wrapper scripts (h5cc,
+# be propagated to the compiler wrapper scripts (h5cc,
# h5c++, et cetera) in addition to being used to compile
# the library.
#
diff --git a/config/clang-warnings/developer-general b/config/clang-warnings/developer-general
index 74d8404..b80552f 100644
--- a/config/clang-warnings/developer-general
+++ b/config/clang-warnings/developer-general
@@ -1,4 +1,3 @@
--Wformat-nonliteral
-Wmissing-noreturn
-Wsometimes-uninitialized
-Wswitch-enum
diff --git a/config/clang-warnings/general b/config/clang-warnings/general
index f0c9b93..433dff9 100644
--- a/config/clang-warnings/general
+++ b/config/clang-warnings/general
@@ -8,19 +8,13 @@
-Wformat=2
-Wframe-larger-than=16384
-Wimplicit-fallthrough
-#
-# NOTE: Due to the divergence in the C and C++, we're dropping support for
-# compiling the C library with a C++ compiler and dropping the -Wc++-compat
-# warning.
-#
--Wno-c++-compat
-#
-# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add
-# it to the developer flags.
-#
--Wno-format-nonliteral
-Wnull-dereference
-Wunused-const-variable
-Wwrite-strings
-Wpedantic
-Wvolatile-register-var
+# NOTE: Due to the divergence in the C and C++, we're dropping support for
+# compiling the C library with a C++ compiler and dropping the -Wc++-compat
+# warning.
+#
+-Wno-c++-compat
diff --git a/config/cmake/libh5cc.in b/config/cmake/libh5cc.in
index 6d54088..f5d8d4c 100644
--- a/config/cmake/libh5cc.in
+++ b/config/cmake/libh5cc.in
@@ -29,7 +29,7 @@ printf 'dir is %s\n' "$dir"
# Show the configuration summary of the library recorded in the
-# libhdf5.settings file residing in the lib directory.
+# libhdf5.settings file reside in the lib directory.
showconfigure()
{
cat $dir/lib/libhdf5.settings
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 56957f9..7b2c4eb 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -254,61 +254,61 @@ set (HDF_EXTRA_C_FLAGS)
set (HDF_EXTRA_FLAGS)
if (MINGW OR NOT WINDOWS)
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
- # Linux Specific flags
- # This was originally defined as _POSIX_SOURCE which was updated to
- # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
- # functionality so clock_gettime and CLOCK_MONOTONIC are defined
- # correctly. This was later updated to 200112L so that
- # posix_memalign() is visible for the direct VFD code on Linux
- # systems.
- # POSIX feature information can be found in the gcc manual at:
- # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L)
-
- # Need to add this so that O_DIRECT is visible for the direct
- # VFD on Linux systems.
- set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_GNU_SOURCE)
-
- option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
- if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN)
- set (msg "Performing TEST_LFS_WORKS")
- try_run (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
- ${CMAKE_BINARY_DIR}
- ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- COMPILE_DEFINITIONS "-DTEST_LFS_WORKS"
- )
-
- # The LARGEFILE definitions were from the transition period
- # and are probably no longer needed. The FILE_OFFSET_BITS
- # check should be generalized for all POSIX systems as it
- # is in the Autotools.
- if (TEST_LFS_WORKS_COMPILE)
- if (TEST_LFS_WORKS_RUN MATCHES 0)
- set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
- set (LARGEFILE 1)
- set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... yes")
- endif ()
- else ()
- set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
- )
- endif ()
- else ()
- set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Test TEST_LFS_WORKS Compile failed\n"
- )
- endif ()
- endif ()
+ # Linux Specific flags
+ # This was originally defined as _POSIX_SOURCE which was updated to
+ # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
+ # functionality so clock_gettime and CLOCK_MONOTONIC are defined
+ # correctly. This was later updated to 200112L so that
+ # posix_memalign() is visible for the direct VFD code on Linux
+ # systems.
+ # POSIX feature information can be found in the gcc manual at:
+ # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
+ set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L)
+
+ # Need to add this so that O_DIRECT is visible for the direct
+ # VFD on Linux systems.
+ set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_GNU_SOURCE)
+
+ option (HDF_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
+ if (HDF_ENABLE_LARGE_FILE AND NOT DEFINED TEST_LFS_WORKS_RUN)
+ set (msg "Performing TEST_LFS_WORKS")
+ try_run (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
+ COMPILE_DEFINITIONS "-DTEST_LFS_WORKS"
+ )
+
+ # The LARGEFILE definitions were from the transition period
+ # and are probably no longer needed. The FILE_OFFSET_BITS
+ # check should be generalized for all POSIX systems as it
+ # is in the Autotools.
+ if (TEST_LFS_WORKS_COMPILE)
+ if (TEST_LFS_WORKS_RUN MATCHES 0)
+ set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
+ set (LARGEFILE 1)
+ set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... yes")
+ endif ()
+ else ()
+ set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
+ )
+ endif ()
+ else ()
+ set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Test TEST_LFS_WORKS Compile failed\n"
+ )
+ endif ()
+ endif ()
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS})
endif ()
endif ()
@@ -557,7 +557,6 @@ if (MINGW OR NOT WINDOWS)
foreach (other_test
HAVE_ATTRIBUTE
HAVE_C99_FUNC
-# STDC_HEADERS
HAVE_FUNCTION
HAVE_C99_DESIGNATED_INITIALIZER
SYSTEM_SCOPE_THREADS
diff --git a/config/gnu-warnings/cxx-general b/config/gnu-warnings/cxx-general
index 9548cc0..1626524 100644
--- a/config/gnu-warnings/cxx-general
+++ b/config/gnu-warnings/cxx-general
@@ -17,7 +17,6 @@
-Winit-self
-Winvalid-pch
-Wmissing-include-dirs
--Wno-format-nonliteral
-Wnon-virtual-dtor
-Wold-style-cast
-Woverloaded-virtual
diff --git a/config/gnu-warnings/developer-general b/config/gnu-warnings/developer-general
index b34c4b7..460b874 100644
--- a/config/gnu-warnings/developer-general
+++ b/config/gnu-warnings/developer-general
@@ -1,9 +1,6 @@
# (suggestions from gcc, not code problems)
-# NOTE: -Wformat-nonliteral added back in here (from being disabled in
-# H5_CFLAGS)
-Waggregate-return
-Wdisabled-optimization
--Wformat-nonliteral
-Winline
-Wmissing-format-attribute
-Wmissing-noreturn
diff --git a/config/gnu-warnings/error-5 b/config/gnu-warnings/error-5
index f7e1138..282ee3f 100644
--- a/config/gnu-warnings/error-5
+++ b/config/gnu-warnings/error-5
@@ -1,4 +1,5 @@
-Werror=incompatible-pointer-types
+-Werror=int-conversion
#
# In GCC 4.4.7, the compiler gripes about shadowed global
# declarations when a local variable uses the name of a
diff --git a/config/gnu-warnings/error-general b/config/gnu-warnings/error-general
index 8405c40..a66d284 100644
--- a/config/gnu-warnings/error-general
+++ b/config/gnu-warnings/error-general
@@ -11,6 +11,7 @@
-Werror=packed
-Werror=pointer-sign
-Werror=pointer-to-int-cast
+-Werror=int-to-pointer-cast
-Werror=redundant-decls
-Werror=strict-prototypes
-Werror=switch
diff --git a/config/gnu-warnings/general b/config/gnu-warnings/general
index a7a20b7..df4c613 100644
--- a/config/gnu-warnings/general
+++ b/config/gnu-warnings/general
@@ -15,18 +15,12 @@
-Winit-self
-Winvalid-pch
-Wmissing-include-dirs
-#
+-Wshadow
+-Wundef
+-Wwrite-strings
+-pedantic
# NOTE: Due to the divergence in the C and C++, we're dropping support for
# compiling the C library with a C++ compiler and dropping the -Wc++-compat
# warning.
#
-Wno-c++-compat
-#
-# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add
-# it to the developer flags.
-#
--Wno-format-nonliteral
--Wshadow
--Wundef
--Wwrite-strings
--pedantic