summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/cmake/H5cxx_config.h.in16
-rw-r--r--config/cmake/H5pubconf.h.in6
-rw-r--r--config/cmake/HDF5UseFortran.cmake76
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake25
-rw-r--r--config/cmake/HDFCompilerFlags.cmake22
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake14
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake9
-rw-r--r--config/cmake_ext_mod/HDFCXXTests.cpp46
-rw-r--r--config/cmake_ext_mod/HDFUseCXX.cmake99
-rw-r--r--config/gnu-cxxflags1
-rw-r--r--config/gnu-warnings/cxx-92
-rw-r--r--config/intel-cxxflags128
-rw-r--r--config/linux-gnulibc114
-rw-r--r--config/pgi-cxxflags96
-rw-r--r--config/pgi-flags63
15 files changed, 300 insertions, 317 deletions
diff --git a/config/cmake/H5cxx_config.h.in b/config/cmake/H5cxx_config.h.in
deleted file mode 100644
index b5ae8ce..0000000
--- a/config/cmake/H5cxx_config.h.in
+++ /dev/null
@@ -1,16 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* src/H5cxx_config.h.in Created manually. */
-
-/* Define if offsetof extension is present */
-#cmakedefine H5_HAVE_OFFSETOF ${H5_HAVE_OFFSETOF}
-
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index dd7fa21..8f32e58 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -26,9 +26,6 @@
/* Define if using a Windows compiler (i.e. Visual Studio) */
#cmakedefine H5_HAVE_VISUAL_STUDIO @H5_HAVE_VISUAL_STUDIO@
-/* Define if C++ compiler recognizes offsetof */
-#cmakedefine H5_CXX_HAVE_OFFSETOF @CXX_HAVE_OFFSETOF@
-
/* Define the default plugins path to compile */
#cmakedefine H5_DEFAULT_PLUGINDIR "@H5_DEFAULT_PLUGINDIR@"
@@ -201,9 +198,6 @@
/* Define to 1 if you have the `ioctl' function. */
#cmakedefine H5_HAVE_IOCTL @H5_HAVE_IOCTL@
-/* Define to 1 if you have the <io.h> header file. */
-#cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@
-
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#cmakedefine H5_HAVE_LIBCRYPTO @H5_HAVE_LIBCRYPTO@
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 003f24f..67f47ec 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -129,74 +129,12 @@ endif ()
# Determine the available KINDs for REALs and INTEGERs
#-----------------------------------------------------------------------------
-#READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
-set (PROG_SRC_CODE
- "
- PROGRAM FC_AVAIL_KINDS
- IMPLICIT NONE
- INTEGER :: ik, jk, k, max_decimal_prec
- INTEGER :: num_rkinds = 1, num_ikinds = 1
- INTEGER, DIMENSION(1:10) :: list_ikinds = -1
- INTEGER, DIMENSION(1:10) :: list_rkinds = -1
-
- OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
-
- ! Find integer KINDs
- list_ikinds(num_ikinds)=SELECTED_INT_KIND(1)
- DO ik = 2, 36
- k = SELECTED_INT_KIND(ik)
- IF(k.LT.0) EXIT
- IF(k.GT.list_ikinds(num_ikinds))THEN
- num_ikinds = num_ikinds + 1
- list_ikinds(num_ikinds) = k
- ENDIF
- ENDDO
-
- DO k = 1, num_ikinds
- WRITE(8,'(I0)', ADVANCE='NO') list_ikinds(k)
- IF(k.NE.num_ikinds)THEN
- WRITE(8,'(A)',ADVANCE='NO') ','
- ELSE
- WRITE(8,'()')
- ENDIF
- ENDDO
-
- ! Find real KINDs
- list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
- max_decimal_prec = 1
-
- prec: DO ik = 2, 36
- exp: DO jk = 1, 17000
- k = SELECTED_REAL_KIND(ik,jk)
- IF(k.LT.0) EXIT exp
- IF(k.GT.list_rkinds(num_rkinds))THEN
- num_rkinds = num_rkinds + 1
- list_rkinds(num_rkinds) = k
- ENDIF
- max_decimal_prec = ik
- ENDDO exp
- ENDDO prec
-
- DO k = 1, num_rkinds
- WRITE(8,'(I0)', ADVANCE='NO') list_rkinds(k)
- IF(k.NE.num_rkinds)THEN
- WRITE(8,'(A)',ADVANCE='NO') ','
- ELSE
- WRITE(8,'()')
- ENDIF
- ENDDO
-
- WRITE(8,'(I0)') max_decimal_prec
- WRITE(8,'(I0)') num_ikinds
- WRITE(8,'(I0)') num_rkinds
- END PROGRAM FC_AVAIL_KINDS
- "
-)
+READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_runs (${PROG_SRC_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90)
+ check_fortran_source_runs (${SOURCE_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90)
else ()
FORTRAN_RUN ("REAL and INTEGER KINDs"
- "${PROG_SRC_CODE}"
+ "${SOURCE_CODE}"
XX
YY
FC_AVAIL_KINDS_RESULT
@@ -260,7 +198,7 @@ foreach (KIND ${VAR})
USE ISO_C_BINDING
IMPLICIT NONE
INTEGER (KIND=${KIND}) a
- OPEN(8,FILE='pac_validIntKinds.out',FORM='formatted')
+ OPEN(8,FILE='pac_validIntKinds.${KIND}.out',FORM='formatted')
WRITE(8,'(I0)') ${FC_SIZEOF_A}
CLOSE(8)
END
@@ -271,7 +209,7 @@ foreach (KIND ${VAR})
else ()
FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC_${KIND}} XX YY VALIDINTKINDS_RESULT_${KIND})
endif ()
- file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.out" PROG_OUTPUT1)
+ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.${KIND}.out" PROG_OUTPUT1)
string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set (pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},")
endforeach ()
@@ -309,7 +247,7 @@ foreach (KIND ${VAR} )
USE ISO_C_BINDING
IMPLICIT NONE
REAL (KIND=${KIND}) a
- OPEN(8,FILE='pac_validRealKinds.out',FORM='formatted')
+ OPEN(8,FILE='pac_validRealKinds.${KIND}.out',FORM='formatted')
WRITE(8,'(I0)') ${FC_SIZEOF_A}
CLOSE(8)
END
@@ -320,7 +258,7 @@ foreach (KIND ${VAR} )
else ()
FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC2_${KIND}} XX YY VALIDREALKINDS_RESULT_${KIND})
endif ()
- file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.out" PROG_OUTPUT1)
+ file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.${KIND}.out" PROG_OUTPUT1)
string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set (pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},")
endforeach ()
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index e2904ca..260bbe0 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -71,10 +71,6 @@ endif ()
# HDF5 library compile options
#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-# CDash is configured to only allow 3000 warnings, so
-# break into groups (from the config/gnu-flags file)
-#-----------------------------------------------------------------------------
if (NOT MSVC AND NOT MINGW)
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
list (APPEND HDF5_CMAKE_CXX_FLAGS "-erroff=%none -DBSD_COMP")
@@ -121,9 +117,9 @@ if (NOT MSVC AND NOT MINGW)
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_DEV_WARNINGS)
message (STATUS "....HDF5 developer group warnings are enabled")
- # if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
- # list (APPEND H5_CXXFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing")
- # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ # if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ # list (APPEND H5_CXXFLAGS "-Winline -Wreorder -Wport -Wstrict-aliasing")
+ # elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
@@ -147,7 +143,7 @@ if (NOT MSVC AND NOT MINGW)
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
endif ()
- # Append more extra warning flags that only gcc 4.8+ know about
+ # Append more extra warning flags that only gcc 4.8+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8")
if (HDF5_ENABLE_DEV_WARNINGS)
@@ -157,14 +153,14 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
- # Append more extra warning flags that only gcc 4.9+ know about
+ # Append more extra warning flags that only gcc 4.9+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9")
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9")
endif ()
- # Append more extra warning flags that only gcc 5.1+ know about
+ # Append more extra warning flags that only gcc 5.1+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5")
@@ -175,13 +171,13 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
- # Append more extra warning flags that only gcc 6.x+ know about
+ # Append more extra warning flags that only gcc 6.x+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
endif ()
- # Append more extra warning flags that only gcc 7.x+ know about
+ # Append more extra warning flags that only gcc 7.x+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXxFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
@@ -193,7 +189,7 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
- # Append more extra warning flags that only gcc 8.x+ know about
+ # Append more extra warning flags that only gcc 8.x+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
@@ -211,10 +207,11 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
- # Append more extra warning flags that only gcc 9.x+ know about
+ # Append more extra warning flags that only gcc 9.x+ knows about
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-9")
endif ()
endif ()
else ()
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index bb6ad78..0775f59 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -81,10 +81,6 @@ endif ()
# HDF5 library compile options
#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-# CDash is configured to only allow 3000 warnings, so
-# break into groups (from the config/gnu-flags file)
-#-----------------------------------------------------------------------------
if (NOT MSVC AND NOT MINGW)
#-----------------------------------------------------------------------------
# Option to allow the user to interpret certain warnings as errors
@@ -178,7 +174,7 @@ if (NOT MSVC AND NOT MINGW)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
endif ()
- # Append more extra warning flags that only gcc 4.8+ know about
+ # Append more extra warning flags that only gcc 4.8+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8")
if (HDF5_ENABLE_DEV_WARNINGS)
@@ -188,12 +184,12 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
- # Append more extra warning flags that only gcc 4.9+ know about
+ # Append more extra warning flags that only gcc 4.9+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9")
endif ()
- # Append more extra warning flags that only gcc 5.x+ know about
+ # Append more extra warning flags that only gcc 5.x+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/5")
if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
@@ -203,12 +199,12 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
- # Append more extra warning flags that only gcc 6.x+ know about
+ # Append more extra warning flags that only gcc 6.x+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
endif ()
- # Append more extra warning flags that only gcc 7.x+ know about
+ # 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")
if (HDF5_ENABLE_DEV_WARNINGS)
@@ -218,7 +214,7 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
- # Append more extra warning flags that only gcc 8.x+ know about
+ # Append more extra warning flags that only gcc 8.x+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
@@ -231,17 +227,17 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
- # Append more extra warning flags that only gcc 9.x+ know about
+ # Append more extra warning flags that only gcc 9.x+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9")
endif ()
- # Append more extra warning flags that only gcc 9.3+ know about
+ # Append more extra warning flags that only gcc 9.3+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3")
endif ()
- # Append more extra warning flags that only gcc 10.x+ know about
+ # Append more extra warning flags that only gcc 10.x+ knows about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0)
if (HDF5_ENABLE_DEV_WARNINGS)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10")
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index 8b631ad..18ab621 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -80,37 +80,37 @@ if (NOT MSVC AND NOT MINGW)
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
- # Append more extra warning flags that only gcc 4.8+ know about
+ # Append more extra warning flags that only gcc 4.8+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.8")
endif ()
- # Append more extra warning flags that only gcc 4.9+ know about
+ # Append more extra warning flags that only gcc 4.9+ knows about
#if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.9)
# ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.9")
#endif ()
- # Append more extra warning flags that only gcc 5.x+ know about
+ # Append more extra warning flags that only gcc 5.x+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.0)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-5")
endif ()
- # Append more extra warning flags that only gcc 6.x+ know about
+ # Append more extra warning flags that only gcc 6.x+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 6.0)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-6")
endif ()
- # Append more extra warning flags that only gcc 7.x+ know about
+ # Append more extra warning flags that only gcc 7.x+ knows about
#if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 7.0)
# ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-7")
#endif ()
- # Append more extra warning flags that only gcc 8.x+ know about
+ # Append more extra warning flags that only gcc 8.x+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-8")
endif ()
- # Append more extra warning flags that only gcc 9.x+ know about
+ # Append more extra warning flags that only gcc 9.x+ knows about
#if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0)
# ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-9")
#endif ()
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 366cf16..0a27692 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -123,19 +123,10 @@ CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H)
CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
# Windows
-CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H)
if (NOT CYGWIN)
CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H)
endif ()
-if (CMAKE_SYSTEM_NAME MATCHES "OSF")
- CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H)
- CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H)
-else ()
- set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
- set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
-endif ()
-
CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H)
CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H)
diff --git a/config/cmake_ext_mod/HDFCXXTests.cpp b/config/cmake_ext_mod/HDFCXXTests.cpp
deleted file mode 100644
index 08ccb34..0000000
--- a/config/cmake_ext_mod/HDFCXXTests.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-#ifdef CXX_HAVE_OFFSETOF
-
-#include <stdio.h>
-#include <stddef.h>
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
-extern "C"
-# endif
-int FC_DUMMY_MAIN()
-{ return 1;}
-#endif
-#endif
-int
-main ()
-{
-
- struct index_st
- {
- unsigned char type;
- unsigned char num;
- unsigned int len;
- };
- typedef struct index_st index_t;
- int x,y;
- x = offsetof(struct index_st, len);
- y = offsetof(index_t, num)
-
- ;
- return 0;
-}
-
-#endif
diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake
deleted file mode 100644
index 423f74a..0000000
--- a/config/cmake_ext_mod/HDFUseCXX.cmake
+++ /dev/null
@@ -1,99 +0,0 @@
-#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://www.hdfgroup.org/licenses.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-#
-# This file provides functions for C++ support.
-#
-#-------------------------------------------------------------------------------
-ENABLE_LANGUAGE (CXX)
-set (HDF_PREFIX "H5")
-
-#-------------------------------------------------------------------------------
-# Fix CXX flags if we are compiling staticly on Windows using
-# Windows_MT.cmake from config/cmake/UserMacros
-#-------------------------------------------------------------------------------
-if (BUILD_STATIC_CRT_LIBS)
- TARGET_STATIC_CRT_FLAGS ()
-endif ()
-
-#-----------------------------------------------------------------------------
-# Configure Checks which require CXX compilation must go in here
-# not in the main ConfigureChecks.cmake files, because if the user has
-# no CXX compiler, problems arise.
-#-----------------------------------------------------------------------------
-include (CheckIncludeFileCXX)
-include (TestForSTDNamespace)
-
-# For other CXX specific tests, use this MACRO.
-macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
- if (NOT DEFINED ${OTHER_TEST})
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- set (OTHER_TEST_ADD_LIBRARIES)
- if (HDF5_REQUIRED_LIBRARIES)
- set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
- endif ()
-
- foreach (def
- HAVE_SYS_TIME_H
- HAVE_UNISTD_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_FILE_H
- )
- if ("${${HDF_PREFIX}_${def}}")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- endif ()
- endforeach ()
-
- if (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
- )
- endif ()
-
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (TRACE "Performing ${OTHER_TEST}")
- endif ()
- TRY_COMPILE (${OTHER_TEST}
- ${CMAKE_BINARY_DIR}
- ${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${OTHER_TEST_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
- if (${OTHER_TEST} EQUAL 0)
- set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Success")
- endif ()
- else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Failed")
- endif ()
- set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Performing CXX Test ${OTHER_TEST} failed with the following output:\n"
- "${OUTPUT}\n"
- )
- endif ()
- endif ()
-endmacro ()
-
-#-----------------------------------------------------------------------------
-# Check a bunch of cxx functions
-#-----------------------------------------------------------------------------
-if (CMAKE_CXX_COMPILER_LOADED)
- foreach (cxx_test
- CXX_HAVE_OFFSETOF
- )
- HDF_CXX_FUNCTION_TEST (${cxx_test})
- endforeach ()
-endif ()
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index 0a7c63e..4fe5782 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -260,6 +260,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
# gcc 9
if test $cxx_vers_major -ge 9; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 9)"
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-9)"
fi
#################
diff --git a/config/gnu-warnings/cxx-9 b/config/gnu-warnings/cxx-9
new file mode 100644
index 0000000..d897de2
--- /dev/null
+++ b/config/gnu-warnings/cxx-9
@@ -0,0 +1,2 @@
+# Turn this on when the C++ wrappers obey the Rule of Five
+-Wno-deprecated-copy
diff --git a/config/intel-cxxflags b/config/intel-cxxflags
new file mode 100644
index 0000000..3ef172f
--- /dev/null
+++ b/config/intel-cxxflags
@@ -0,0 +1,128 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# Intel icpc compiler or a derivative. It is careful not to do anything
+# if the compiler is not Intel; otherwise `cxx_flags_set' is set to `yes'
+#
+
+# Get the compiler version in a way that works for icpc
+# icpc unless a compiler version is already known
+#
+# cxx_vendor: The compiler name: icpc
+# cxx_version: Version number: 8.0
+#
+if test X = "X$cxx_flags_set"; then
+ cxx_version="`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 |grep 'Version'`"
+ if test X != "X$cxx_version"; then
+ cxx_vendor=icpc
+ cxx_version=`echo $cxx_version |sed 's/.*Version \([-a-z0-9\.\-]*\).*/\1/'`
+ echo "compiler '$CXX' is Intel $cxx_vendor-$cxx_version"
+
+ # Some version numbers
+ # Intel version numbers are of the form: "major.minor"
+ cxx_vers_major=`echo $cxx_version | cut -f1 -d.`
+ cxx_vers_minor=`echo $cxx_version | cut -f2 -d.`
+ #cxx_vers_patch=`echo $cxx_version | cut -f2 -d.`
+ test -n "$cxx_vers_major" || cxx_vers_major=0
+ test -n "$cxx_vers_minor" || cxx_vers_minor=0
+ test -n "$cxx_vers_patch" || cxx_vers_patch=0
+ cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch`
+ fi
+fi
+
+# Common Intel flags for various situations
+if test "X-icpc" = "X-$cxx_vendor"; then
+ # Insert section about version specific problems from compiler flags here,
+ # if necessary.
+
+ arch=
+ # Architecture-specific flags
+ # Nothing currently. (Uncomment code below and modify to add any)
+ #case "$host_os-$host_cpu" in
+ # *-i686)
+ # arch="-march=i686"
+ # ;;
+ #esac
+
+ # Host-specific flags
+ # Nothing currently. (Uncomment code below and modify to add any)
+ #case "`hostname`" in
+ # sleipnir.ncsa.uiuc.edu)
+ # arch="$arch -pipe"
+ # ;;
+ #esac
+
+ ###########
+ # General #
+ ###########
+
+ # Default to C++11 standard
+ H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++11"
+
+ ##############
+ # Production #
+ ##############
+
+ PROD_CXXFLAGS=
+
+ #########
+ # Debug #
+ #########
+
+ # NDEBUG is handled explicitly by the configure script
+ # -g is handled by the symbols flags
+ DEBUG_CXXFLAGS=
+
+ ###########
+ # Symbols #
+ ###########
+
+ SYMBOLS_CXXFLAGS="-g"
+ NO_SYMBOLS_CXXFLAGS="-Wl,-s"
+
+ #############
+ # Profiling #
+ #############
+
+ # Use this for profiling with gprof
+ PROFILE_CXXFLAGS="-p"
+
+ ################
+ # Optimization #
+ ################
+
+ HIGH_OPT_CXXFLAGS="-O3"
+ DEBUG_OPT_CXXFLAGS="-O0"
+ NO_OPT_CXXFLAGS="-O0"
+
+ ############
+ # Warnings #
+ ############
+
+ #############################
+ # Version-specific warnings #
+ #############################
+
+ #################
+ # Flags are set #
+ #################
+ cxx_flags_set=yes
+
+fi
+
+# Clear cc info if no flags set
+if test "X-$cxx_flags_set" = "X-"; then
+ cxx_vendor=
+ cxx_version=
+fi
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index 0fef161..d952c4e 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -199,9 +199,16 @@ if test -z "$CXX"; then
CXX_BASENAME=g++
fi
+# Figure out Intel CXX compiler flags
+# Do this ahead of GNU to avoid icpc being detected as g++
+. $srcdir/config/intel-cxxflags
+
# Figure out GNU CXX compiler flags
. $srcdir/config/gnu-cxxflags
+# Figure out PGI CXX compiler flags
+. $srcdir/config/pgi-cxxflags
+
# Figure out Clang CXX compiler flags
. $srcdir/config/clang-cxxflags
@@ -314,6 +321,9 @@ fi
# check if the compiler_version_info is already set
if test -z "$cxx_version_info"; then
case $CXX in
+ *pgc++*)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgc++'`
+ ;;
*g++*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
@@ -322,10 +332,6 @@ case $CXX in
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;
- *pgCC*)
- cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgCC'`
- ;;
-
*mpicxx*)
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -v 2>&1 | grep 'version' |\
sed 's/^[a-z0-9]* for //' |\
diff --git a/config/pgi-cxxflags b/config/pgi-cxxflags
new file mode 100644
index 0000000..3b87db2
--- /dev/null
+++ b/config/pgi-cxxflags
@@ -0,0 +1,96 @@
+# -*- shell-script -*-
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+
+
+# This file should be sourced into configure if the compiler is the
+# PGI pgc++ compiler or a derivative. It is careful not to do anything
+# if the compiler is not PGI; otherwise `cxx_flags_set' is set to `yes'
+#
+
+# Get the compiler version in a way that works for pgc++
+# pgc++ unless a compiler version is already known
+#
+# cxx_vendor: The compiler name: pgc++
+# cxx_version: Version number: 5.0-2, 5.2-2
+#
+if test X = "X$cxx_flags_set"; then
+ cxx_version="`$CXX $CXXFLAGS -V 2>&1 |grep '^pgc++ '`"
+ if test X != "X$cxx_version"; then
+ cxx_vendor=`echo $cxx_version |sed 's/\([a-z]*++\).*/\1/'`
+ cxx_version=`echo $cxx_version |sed 's/pgc++ \([-a-z0-9\.\-]*\).*/\1/'`
+ echo "compiler '$CXX' is PGI $cxx_vendor-$cxx_version"
+
+ # Some version numbers
+ # PGI version numbers are of the form: "major.minor-patch"
+ cxx_vers_major=`echo $cxx_version | cut -f1 -d.`
+ cxx_vers_minor=`echo $cxx_version | cut -f2 -d. | cut -f1 -d-`
+ cxx_vers_patch=`echo $cxx_version | cut -f2 -d. | cut -f2 -d-`
+ test -n "$cxx_vers_major" || cxx_vers_major=0
+ test -n "$cxx_vers_minor" || cxx_vers_minor=0
+ test -n "$cxx_vers_patch" || cxx_vers_patch=0
+ cxx_vers_all=`expr $cxx_vers_major '*' 1000000 + $cxx_vers_minor '*' 1000 + $cxx_vers_patch`
+ fi
+fi
+
+# Common PGI flags for various situations
+if test "X-pgc++" = "X-$cxx_vendor"; then
+
+ # C++-specific
+ H5_CXXFLAGS="$H5_CXXFLAGS -std=c++11 -Minform=warn"
+
+ ##############
+ # Production #
+ ##############
+
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CXXFLAGS="-fast"
+
+ #########
+ # Debug #
+ #########
+
+ # NDEBUG is handled explicitly by the configure script
+ # -g is handled by the symbols flags
+ DEBUG_CXXFLAGS="-Mbounds"
+
+ ###########
+ # Symbols #
+ ###########
+
+ SYMBOLS_CXXFLAGS="-g"
+ NO_SYMBOLS_CXXFLAGS="-s"
+
+ #############
+ # Profiling #
+ #############
+
+ PROFILE_CXXFLAGS="-Mprof=func,line"
+ # Use this for profiling with gprof
+ #PROFILE_CXXFLAGS="-pg"
+
+ ################
+ # Optimization #
+ ################
+
+ HIGH_OPT_CXXFLAGS="-O4"
+ DEBUG_OPT_CXXFLAGS="-gopt -O2"
+ NO_OPT_CXXFLAGS="-O0"
+
+ # Flags are set
+ cxx_flags_set=yes
+fi
+
+# Clear cxx info if no flags set
+if test "X-$cxx_flags_set" = "X-"; then
+ cxx_vendor=
+ cxx_version=
+fi
diff --git a/config/pgi-flags b/config/pgi-flags
index e1bec00..24c7174 100644
--- a/config/pgi-flags
+++ b/config/pgi-flags
@@ -66,50 +66,45 @@ if test "X-pgcc" = "X-$cc_vendor"; then
#esac
# General
- H5_CFLAGS="$H5_CFLAGS $arch -c99 -Minform=inform"
-
- # Production
- case "$cc_vendor-$cc_version" in
- pgcc-10.6*)
- PROD_CFLAGS=
- ;;
- pgcc-9.*)
- PROD_CFLAGS=
- ;;
- *)
- PROD_CFLAGS="-fast"
- ;;
- esac
-
- # Debug
+ H5_CFLAGS="$H5_CFLAGS $arch -c99 -Minform=warn"
+
+ ##############
+ # Production #
+ ##############
+
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CFLAGS="-fast"
+
+ #########
+ # Debug #
+ #########
+
# NDEBUG is handled explicitly by the configure script
+ # -g is handled by the symbols flags
DEBUG_CFLAGS="-Mbounds"
- # Symbols
+ ###########
+ # Symbols #
+ ###########
+
SYMBOLS_CFLAGS="-g"
NO_SYMBOLS_CFLAGS="-s"
- # Profiling
+ #############
+ # Profiling #
+ #############
+
PROFILE_CFLAGS="-Mprof=func,line"
# Use this for profiling with gprof
#PROFILE_CFLAGS="-pg"
- # Optimization
- case "$cc_vendor-$cc_version" in
- # Tweak down compiler optimizations for v10.6, it has a bug
- pgcc-10.6*)
- HIGH_OPT_CFLAGS="-O1"
- ;;
- # Tweak down compiler optimizations for v9.x
- pgcc-9.*)
- HIGH_OPT_CFLAGS="-O1"
- ;;
- *)
- HIGH_OPT_CFLAGS=
- ;;
- esac
- DEBUG_OPT_CFLAGS=
- NO_OPT_CFLAGS=
+ ################
+ # Optimization #
+ ################
+
+ HIGH_OPT_CFLAGS="-O4"
+ DEBUG_OPT_CFLAGS="-gopt -O2"
+ NO_OPT_CFLAGS="-O0"
# Flags are set
cc_flags_set=yes