diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2015-10-14 21:27:13 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2015-10-14 21:27:13 (GMT) |
commit | dcda11177990040c790730808842c556f7ba16f7 (patch) | |
tree | 4078a61ec4bc6f7bfd19e34f9c1ab2d25b2173e8 /fortran | |
parent | cc261eb5e5cd016ec1529f44759f73cda2dc52bf (diff) | |
download | hdf5-dcda11177990040c790730808842c556f7ba16f7.zip hdf5-dcda11177990040c790730808842c556f7ba16f7.tar.gz hdf5-dcda11177990040c790730808842c556f7ba16f7.tar.bz2 |
[svn-r28074] Merge from trunk CMake code.
Also two fortran source files were changed.
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/CMakeLists.txt | 5 | ||||
-rw-r--r-- | fortran/src/H5_ff.F90 | 32 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 13 | ||||
-rw-r--r-- | fortran/test/tH5P_F03.F90 | 3 |
4 files changed, 23 insertions, 30 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 4f19ed3..dc884d5 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -76,11 +76,6 @@ if (WIN32) else (WIN32) set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) endif (WIN32) -if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) -else (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) -endif (WIN32) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 74e543b..169864f 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -374,42 +374,50 @@ CONTAINS ! August 25, 2008 ! ! Fortran90 Interface: - INTEGER(HID_T) FUNCTION h5kind_to_type(kind, flag) RESULT(h5_type) + INTEGER(HID_T) FUNCTION h5kind_to_type(ikind, flag) RESULT(h5_type) + USE ISO_C_BINDING IMPLICIT NONE - INTEGER, INTENT(IN) :: kind + INTEGER, INTENT(IN) :: ikind INTEGER, INTENT(IN) :: flag +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + INTEGER :: Fortran_INTEGER_16 + Fortran_INTEGER_16=SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors +#endif + + !***** IF(flag.EQ.H5_INTEGER_KIND)THEN - IF(kind.EQ.Fortran_INTEGER_1)THEN + IF(ikind.EQ.Fortran_INTEGER_1)THEN h5_type = H5T_NATIVE_INTEGER_1 - ELSE IF(kind.EQ.Fortran_INTEGER_2)THEN + ELSE IF(ikind.EQ.Fortran_INTEGER_2)THEN h5_type = H5T_NATIVE_INTEGER_2 - ELSE IF(kind.EQ.Fortran_INTEGER_4)THEN + ELSE IF(ikind.EQ.Fortran_INTEGER_4)THEN h5_type = H5T_NATIVE_INTEGER_4 - ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN + ELSE IF(ikind.EQ.Fortran_INTEGER_8)THEN h5_type = H5T_NATIVE_INTEGER_8 #if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 - ELSE IF(kind.EQ.Fortran_INTEGER_16)THEN + ELSE IF(ikind.EQ.Fortran_INTEGER_16)THEN h5_type = H5T_NATIVE_INTEGER_16 #endif ENDIF ELSE IF(flag.EQ.H5_REAL_KIND)THEN - IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN + IF(ikind.EQ.KIND(1.0_C_FLOAT))THEN h5_type = H5T_NATIVE_REAL_C_FLOAT - ELSE IF(kind.EQ.Fortran_REAL_C_DOUBLE)THEN + ELSE IF(ikind.EQ.KIND(1.0_C_DOUBLE))THEN h5_type = H5T_NATIVE_REAL_C_DOUBLE #if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0 - ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN + ELSE IF(ikind.EQ.KIND(1.0_C_LONG_DOUBLE))THEN h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE #endif #if H5_PAC_FC_MAX_REAL_PRECISION > 28 #if H5_HAVE_FLOAT128 == 1 - ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN + ELSE h5_type = H5T_NATIVE_FLOAT_128 #endif -#endif +#else ELSE h5_type = -1 +#endif ENDIF ENDIF diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 97830ad..0cbd17f 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -98,19 +98,6 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_TF_SRCS}) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) -set (CMD $<TARGET_FILE:H5_test_buildiface>) -add_custom_target (H5testgen ALL - COMMAND ${CMD} -#v3.2 BYPRODUCT ${HDF5_F90_BINARY_DIR}/tf_gen.F90 - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5_test_buildiface -) - -add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_TF_SRCS}) -if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_TF_SRCS}) -endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET} diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90 index ec9fef2..8982fc2 100644 --- a/fortran/test/tH5P_F03.F90 +++ b/fortran/test/tH5P_F03.F90 @@ -221,6 +221,9 @@ SUBROUTINE test_create(total_error) CALL h5dopen_f(file, "dset9", dset9, error) CALL check("h5dopen_f", error, total_error) + CALL H5Pclose_f(dcpl, error) + CALL check("H5Pclose_f", error, total_error) + CALL H5Dget_create_plist_f(dset9, dcpl, error) CALL check("H5Dget_create_plist_f", error, total_error) |