diff options
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/test/CMakeLists.txt | 7 | ||||
-rw-r--r-- | fortran/test/Makefile.am | 4 | ||||
-rw-r--r-- | fortran/test/Makefile.in | 29 | ||||
-rw-r--r-- | fortran/test/tf_F90.f90 | 32 |
4 files changed, 62 insertions, 10 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 7c31fe4..d10f2ef 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -21,10 +21,15 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" ) +# See if the F2008 intrinsic STORAGE_SIZE and C_SIZEOF are supported. If not then +# fall back to F2003. If F2003 not supported then use F90 for the tests. + if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F08.f90 tf.f90) -else (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) +elseif (HDF5_ENABLE_F2003) add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F03.f90 tf.f90) +else (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) + add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F90.f90 tf.f90) endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index 9a04106..735ab7a 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -60,7 +60,11 @@ else libh5test_fortran_la_SOURCES = tf_F03.f90 endif else +if FORTRAN_2003_CONDITIONAL_F libh5test_fortran_la_SOURCES = tf_F03.f90 +else + libh5test_fortran_la_SOURCES = tf_F90.f90 +endif endif # tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 42eecef..0b3935b 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -101,16 +101,20 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libh5test_fortran_la_LIBADD = -am__libh5test_fortran_la_SOURCES_DIST = tf_F03.f90 tf.f90 t.c \ - tf_F08.f90 +am__libh5test_fortran_la_SOURCES_DIST = tf_F90.f90 tf.f90 t.c \ + tf_F03.f90 tf_F08.f90 +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F90.lo \ +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \ +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.lo \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.lo @FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \ @FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \ @FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo @FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F08.lo \ @FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \ @FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo -@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = \ -@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf_F03.lo tf.lo t.lo libh5test_fortran_la_OBJECTS = $(am_libh5test_fortran_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -751,6 +755,18 @@ TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 \ # tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be # compiled first +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F90.f90 \ +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \ +@FORTRAN_2003_CONDITIONAL_F_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c + +# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be +# compiled first +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = tf_F03.f90 \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf.f90 \ +@FORTRAN_2003_CONDITIONAL_F_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ t.c + +# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be +# compiled first @FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F03.f90 \ @FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \ @FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c @@ -761,11 +777,6 @@ TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 \ @FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \ @FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c -# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be -# compiled first -@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = \ -@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf_F03.f90 tf.f90 t.c - # Source files are used for both the library and fortranlib_test. # Automake will complain about this without the following workaround. fortranlib_test_FCFLAGS = $(AM_FCFLAGS) diff --git a/fortran/test/tf_F90.f90 b/fortran/test/tf_F90.f90 new file mode 100644 index 0000000..e820350 --- /dev/null +++ b/fortran/test/tf_F90.f90 @@ -0,0 +1,32 @@ +!****h* root/fortran/test/tf_F90.f90 +! +! NAME +! tf_F90.f90 +! +! FUNCTION +! Module for when the compiler is not F2003 or F2008 compliant. +! Needed by tf.f90 for the test programs. +! +! COPYRIGHT +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! 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. * +! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +! +!***** +MODULE TH5_MISC_PROVISIONAL + + INTEGER, PARAMETER :: sp = KIND(0.0) + INTEGER, PARAMETER :: dp = KIND(0.D0) + +END MODULE TH5_MISC_PROVISIONAL |