summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDF5UseFortran.cmake62
-rw-r--r--config/cmake/cacheinit.cmake2
-rw-r--r--config/conclude_fc.am33
-rw-r--r--config/lt_vers.am2
-rw-r--r--config/pgi-fflags1
5 files changed, 67 insertions, 33 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index b3dec14..8ca10a7 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -227,9 +227,9 @@ message ( " ........MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}")
# **********
# INTEGERS
# **********
-string(REGEX REPLACE "," ";" VAR_KIND "${pac_validIntKinds}")
+string(REGEX REPLACE "," ";" VAR "${pac_validIntKinds}")
-foreach( KIND ${VAR_KIND} )
+foreach( KIND ${VAR} )
set(PROG_SRC
"
PROGRAM main
@@ -262,14 +262,14 @@ message("...FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
# **********
# REALS
# **********
-string(REGEX REPLACE "," ";" VAR_KIND "${pac_validRealKinds}")
+string(REGEX REPLACE "," ";" VAR "${pac_validRealKinds}")
#find the maximum kind of the real
-list(LENGTH VAR_KIND LEN_VAR_KIND)
-MATH (EXPR _LEN "${LEN_VAR_KIND} - 1")
-list(GET VAR_KIND ${_LEN} max_real_fortran_kind)
+list(LENGTH VAR LEN_VAR)
+MATH (EXPR _LEN "${LEN_VAR}-1")
+list(GET VAR ${_LEN} max_real_fortran_kind)
-foreach( KIND ${VAR_KIND} )
+foreach( KIND ${VAR} )
set(PROG_SRC
"
PROGRAM main
@@ -299,12 +299,14 @@ set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof =
message("...FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}")
+set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}")
+
#find the maximum kind of the real
-list(LENGTH VAR_KIND LEN_VAR_KIND)
-MATH (EXPR _LEN "${LEN_VAR_KIND} - 1")
-list(GET VAR_KIND ${_LEN} max_real_fortran_sizeof)
+string(REGEX REPLACE "," ";" VAR "${pack_real_sizeof}")
+list(LENGTH VAR LEN_VAR)
+MATH (EXPR _LEN "${LEN_VAR}-1")
+list(GET VAR ${_LEN} max_real_fortran_sizeof)
-set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}")
#-----------------------------------------------------------------------------
# Find sizeof of native kinds
#-----------------------------------------------------------------------------
@@ -351,14 +353,18 @@ set(FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE})
# remove the invalid kind from the list
if(NOT(${SIZEOF___FLOAT128} EQUAL 0))
- if(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof}))
+ if(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof})
+ AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})
+ # account for the fact that the C compiler can have 16-byte __float128 and the fortran compiler only has 8-byte doubles,
+ # so we don't want to remove the 8-byte fortran doubles.
+ AND NOT(${PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF} EQUAL ${max_real_fortran_sizeof}))
message(WARNING "
Fortran REAL(KIND=${max_real_fortran_kind}) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size
!!! Fortran interfaces will not be generated for REAL(KIND=${max_real_fortran_kind}) !!!")
string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS ${PAC_FC_ALL_REAL_KINDS})
string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS_SIZEOF ${PAC_FC_ALL_REAL_KINDS_SIZEOF})
MATH (EXPR NUM_RKIND "${NUM_RKIND} - 1")
- endif(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof}))
+ endif()
endif(NOT(${SIZEOF___FLOAT128} EQUAL 0))
set(H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}")
@@ -377,9 +383,7 @@ ENABLE_LANGUAGE (C)
# The provided CMake C macros don't provide a general compile/run function
# so this one is used.
#-----------------------------------------------------------------------------
-MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN)
-# MSB CHECK WHY THIS CHECK?
-# if (NOT DEFINED ${RUN_RESULT_VAR})
+MACRO (C_RUN FUNCTION CODE RETURN)
message (STATUS "Detecting C ${FUNCTION}")
if (CMAKE_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
@@ -391,7 +395,7 @@ MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
${CODE}
)
- TRY_RUN (${RUN_RESULT_VAR} ${COMPILE_RESULT_VAR}
+ TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
@@ -400,18 +404,14 @@ MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN)
set(${RETURN} ${OUTPUT})
- #message ( "Test result1 ${RETURN} ")
- #message ( "Test result3 ${RESULT} ")
- #message ( "Test result2 ${CMAKE_MATCH_0} ")
- #message ( "Test result4 ${CMAKE_MATCH_1} ")
#message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- #message ( "Test result ${COMPILE_RESULT_VAR} ")
+ #message ( "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
#message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- #message ( "Test result ${RUN_RESULT_VAR} ")
+ #message ( "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
#message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
if (${COMPILE_RESULT_VAR})
- if (${RUN_RESULT_VAR} MATCHES 0)
+ if (${RUN_RESULT_VAR} MATCHES 1)
set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION}")
message (STATUS "Testing C ${FUNCTION} - OK")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
@@ -420,13 +420,14 @@ MACRO (C_RUN FUNCTION CODE RUN_RESULT_VAR COMPILE_RESULT_VAR RETURN)
)
else ()
message (STATUS "Testing C ${FUNCTION} - Fail")
- set (${RUN_RESULT_VAR} "" CACHE INTERNAL "Have C function ${FUNCTION}")
+ set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION}")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the C ${FUNCTION} exists failed with the following output:\n"
"${OUTPUT}\n\n")
endif ()
+ else ()
+ message (FATAL_ERROR "Compilation of C ${FUNCTION} - Failed")
endif()
-# endif (NOT DEFINED ${RUN_RESULT_VAR})
ENDMACRO (C_RUN)
set(PROG_SRC
@@ -451,17 +452,14 @@ set(PROG_SRC
#else
#define C_LDBL_DIG LDBL_DIG
#endif
- void main() {
+ int main() {
printf(\"%d\\\\n%d\\\\n\", C_LDBL_DIG, C_FLT128_DIG)\\\;
+ return 1\\\;
}
"
)
-C_RUN("maximum decimal precision for C" ${PROG_SRC}
- XX
- YY
- PROG_OUTPUT
-)
+C_RUN("maximum decimal precision for C" ${PROG_SRC} PROG_OUTPUT)
# dnl The output from the above program will be:
# dnl -- LINE 1 -- long double decimal precision
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index cca6e98..4bef99f 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -46,6 +46,8 @@ set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default"
set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
+set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE)
+
set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
diff --git a/config/conclude_fc.am b/config/conclude_fc.am
new file mode 100644
index 0000000..d9e7b56
--- /dev/null
+++ b/config/conclude_fc.am
@@ -0,0 +1,33 @@
+## config/conclude_fc.am
+## (Use double hashes for copyright notice so that automake treats it as
+## comments and does not pass it to Makefile.in)
+## Copyright by The HDF Group.
+## Copyright by the Board of Trustees of the University of Illinois.
+## 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 files COPYING and Copyright.html. COPYING can be found at the root
+## of the source code distribution tree; Copyright.html can be found at the
+## root level of an installed copy of the electronic HDF5 document set and
+## is linked from the top-level documents page. It can also be found at
+## http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+## access to either file, you may request a copy from help@hdfgroup.org.
+
+
+## Textually included at the end of the Fortran HDF5 Makefiles.am.
+
+# Makefile.am include fragment with Fortran helper rules and macros.
+
+# AM_FCCPPFLAGS, FCCPPFLAGS are currently not used.
+
+PPFCCOMPILE = $(FC) $(FCDEFS) $(DEFAULT_INCLUDES) $(FCINCLUDES) $(AM_FCCPPFLAGS) $(FCCPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(PPFCCOMPILE)
+
+# Treat all .f90 and .F90 files as preprocessed Fortran.
+.f90.o:
+ $(PPFCCOMPILE) -c -o $@ $(FCFLAGS) $<
+.F90.o:
+ $(PPFCCOMPILE) -c -o $@ $(FCFLAGS) $<
+
+include $(top_srcdir)/config/conclude.am
diff --git a/config/lt_vers.am b/config/lt_vers.am
index ac029c0..0a07eb7 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -19,7 +19,7 @@
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 217
+LT_VERS_REVISION = 220
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/config/pgi-fflags b/config/pgi-fflags
index 6cb8930..8e574e4 100644
--- a/config/pgi-fflags
+++ b/config/pgi-fflags
@@ -69,6 +69,7 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
# General
FC_BASENAME=pgf90
+ Fortran_COMPILER_ID=PGI
F9XSUFFIXFLAG=""
FSEARCH_DIRS=""
# Uncomment the following to add something specific for FCFLAGS.