summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-06-09 21:29:04 (GMT)
committerGitHub <noreply@github.com>2022-06-09 21:29:04 (GMT)
commit0311d4c00a14ad2268c3b2aaa4a248c423afdbc8 (patch)
tree5fd961a0cf50912145cb0e2420566913170726d4 /config
parentb2794b474acaf9050b03239502056bdd34975db8 (diff)
downloadhdf5-0311d4c00a14ad2268c3b2aaa4a248c423afdbc8.zip
hdf5-0311d4c00a14ad2268c3b2aaa4a248c423afdbc8.tar.gz
hdf5-0311d4c00a14ad2268c3b2aaa4a248c423afdbc8.tar.bz2
Hdf5 1 10 sync (#1795)
* Branch sync updates and spelling * Revert format of getenv
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDF5_Examples.cmake.in2
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake2
-rw-r--r--config/cmake/HDFCompilerFlags.cmake1
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake97
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake8
-rw-r--r--config/gnu-flags1
-rw-r--r--config/gnu-warnings/71
-rw-r--r--config/gnu-warnings/cxx-general1
-rw-r--r--config/gnu-warnings/developer-general3
-rw-r--r--config/gnu-warnings/error-71
-rw-r--r--config/gnu-warnings/general14
-rw-r--r--config/ibm-aix8
12 files changed, 67 insertions, 72 deletions
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index be69e64..cda4062 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -77,7 +77,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
-# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.17-Source")
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.18-Source")
#endif()
###############################################################################################################
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index 958fe73..dcc96cf 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -9,6 +9,8 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+ENABLE_LANGUAGE (CXX)
+
set (CMAKE_CXX_STANDARD 98)
set (CMAKE_CXX_STANDARD_REQUIRED TRUE)
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index eb43b73..61218dc 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -231,6 +231,7 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Append more extra warning flags that only gcc 7.x+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-7")
if (HDF5_ENABLE_DEV_WARNINGS)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7")
#else ()
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index f022a4c..41f53e1 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -253,65 +253,63 @@ set (LINUX_LFS 0)
set (HDF_EXTRA_C_FLAGS)
set (HDF_EXTRA_FLAGS)
if (MINGW OR NOT WINDOWS)
- # Might want to check explicitly for Linux and possibly Cygwin
- # instead of checking for not Solaris or Darwin.
- if (NOT ${HDF_PREFIX}_HAVE_SOLARIS AND NOT ${HDF_PREFIX}_HAVE_DARWIN)
- # 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"
- )
+ 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")
+ # 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")
+ 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"
+ "Test TEST_LFS_WORKS Compile failed\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})
+ set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS})
endif ()
endif ()
@@ -559,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/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 0f9b367..260fd55 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -267,10 +267,14 @@ macro (HDF_README_PROPERTIES target_fortran)
elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*")
if (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.0.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.16.*")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.1.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017")
- else () #19.23
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.2.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2019")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.3.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2022")
+ else ()
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ???")
endif ()
else ()
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
diff --git a/config/gnu-flags b/config/gnu-flags
index fe6626d..e25f59b 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -254,6 +254,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
# gcc >= 7
if test $cc_vers_major -ge 7; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 7)"
+ H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-7)"
DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-7)"
fi
diff --git a/config/gnu-warnings/7 b/config/gnu-warnings/7
index 9d5b44d..cb8834a 100644
--- a/config/gnu-warnings/7
+++ b/config/gnu-warnings/7
@@ -3,4 +3,3 @@
-Wduplicated-branches
-Wformat-overflow=2
-Wformat-truncation=1
--Wrestrict
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-7 b/config/gnu-warnings/error-7
new file mode 100644
index 0000000..8eb9fe4
--- /dev/null
+++ b/config/gnu-warnings/error-7
@@ -0,0 +1 @@
+-Werror=restrict
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
diff --git a/config/ibm-aix b/config/ibm-aix
index b4a558d..f48f9d8 100644
--- a/config/ibm-aix
+++ b/config/ibm-aix
@@ -47,10 +47,10 @@ if test "X-" = "X-$FC"; then
fi
fi
-# While we try to avoid setting FCFLAGS directly for use in compilation, in
-# this case we need the -k flag present for some configure checks. As such,
-# the configure script saves the user's set FCFLAGS before running, and
-# restores them when complete. We must then set up both FCFLAGS and H5_FCFLAGS
+# While we try to avoid setting FCFLAGS directly for use in compilation, in
+# this case we need the -k flag present for some configure checks. As such,
+# the configure script saves the user's set FCFLAGS before running, and
+# restores them when complete. We must then set up both FCFLAGS and H5_FCFLAGS
# to ensure the flag is present for both configure as well as for the build.
if test "X-" = "X-$f9x_flags_set"; then
F9XSUFFIXFLAG="-qsuffix=f=f90"