diff options
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/CMakeLists.txt | 131 | ||||
-rw-r--r-- | fortran/Makefile.in | 3 | ||||
-rw-r--r-- | fortran/examples/CMakeLists.txt | 23 | ||||
-rw-r--r-- | fortran/examples/Makefile.in | 3 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 9 | ||||
-rw-r--r-- | fortran/src/H5Ff.c | 33 | ||||
-rw-r--r-- | fortran/src/H5Lf.c | 13 | ||||
-rw-r--r-- | fortran/src/Makefile.in | 5 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 37 | ||||
-rw-r--r-- | fortran/test/Makefile.in | 3 | ||||
-rw-r--r-- | fortran/test/tH5A_1_8.f90 | 6 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 9 | ||||
-rw-r--r-- | fortran/testpar/Makefile.in | 3 |
13 files changed, 74 insertions, 204 deletions
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index a4bfb17..1a6329f 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -2,142 +2,11 @@ cmake_minimum_required (VERSION 2.8) PROJECT (HDF5_F90 C CXX Fortran) #----------------------------------------------------------------------------- -# Detect name mangling convention used between Fortran and C -#----------------------------------------------------------------------------- -INCLUDE (FortranCInterface) -FortranCInterface_HEADER ( - ${HDF5_F90_BINARY_DIR}/FCMangle.h - MACRO_NAMESPACE "H5_FC_" - SYMBOL_NAMESPACE "H5_FC_" - SYMBOLS mysub mymod:my_sub -) - -FILE (STRINGS ${HDF5_F90_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)") -STRING (REGEX MATCH "H5_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) -SET (H5_FC_FUNC "H5_FC_FUNC(name,NAME) ${CMAKE_MATCH_1}" PARENT_SCOPE) - -FILE (STRINGS ${HDF5_F90_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)") -STRING (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) -SET (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}" PARENT_SCOPE) - -#----------------------------------------------------------------------------- -# The provided CMake Fortran macros don't provide a general check function -# so this one is used for a sizeof test. -#----------------------------------------------------------------------------- -MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) - IF (NOT DEFINED ${VARIABLE}) - MESSAGE (STATUS "Testing Fortran ${FUNCTION}") - IF (CMAKE_REQUIRED_LIBRARIES) - SET (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") - ELSE (CMAKE_REQUIRED_LIBRARIES) - SET (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) - ENDIF (CMAKE_REQUIRED_LIBRARIES) - FILE (WRITE - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f - "${CODE}" - ) - TRY_COMPILE (${VARIABLE} - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f - CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" - OUTPUT_VARIABLE OUTPUT - ) - -# MESSAGE ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") -# MESSAGE ( "Test result ${OUTPUT}") -# MESSAGE ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - - IF (${VARIABLE}) - SET (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") - MESSAGE (STATUS "Testing Fortran ${FUNCTION} - OK") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" - "${OUTPUT}\n\n" - ) - ELSE (${VARIABLE}) - MESSAGE (STATUS "Testing Fortran ${FUNCTION} - Fail") - SET (${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" - "${OUTPUT}\n\n") - ENDIF (${VARIABLE}) - ENDIF (NOT DEFINED ${VARIABLE}) -ENDMACRO (CHECK_FORTRAN_FEATURE) - -#----------------------------------------------------------------------------- -# Configure Checks which require Fortran compilation must go in here -# not in the main ConfigureChecks.cmake files, because if the user has -# no Fortran compiler, problems arise. -# -# Be careful with leading spaces here, do not remove them. -#----------------------------------------------------------------------------- -CHECK_FORTRAN_FEATURE(sizeof - " - PROGRAM main - i = sizeof(x) - END PROGRAM - " - FORTRAN_HAVE_SIZEOF -) - -CHECK_FORTRAN_FEATURE(RealIsNotDouble - " - MODULE type_mod - INTERFACE h5t - MODULE PROCEDURE h5t_real - MODULE PROCEDURE h5t_dble - END INTERFACE - CONTAINS - SUBROUTINE h5t_real(r) - REAL :: r - END SUBROUTINE h5t_real - SUBROUTINE h5t_dble(d) - DOUBLE PRECISION :: d - END SUBROUTINE h5t_dble - END MODULE type_mod - PROGRAM main - USE type_mod - REAL :: r - DOUBLE PRECISION :: d - CALL h5t(r) - CALL h5t(d) - END PROGRAM main - " - FORTRAN_DEFAULT_REAL_NOT_DOUBLE -) - -#----------------------------------------------------------------------------- -# Make sure generated files and modules are picked up correctly -#----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES ( - ${CMAKE_Fortran_MODULE_DIRECTORY} - ${HDF5_F90_BINARY_DIR} -) - -#----------------------------------------------------------------------------- -# Add debug information (intel Fortran : JB) -#----------------------------------------------------------------------------- -IF (CMAKE_Fortran_COMPILER MATCHES ifort) - IF (WIN32) - SET (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE) - SET (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE) - ENDIF (WIN32) -ENDIF (CMAKE_Fortran_COMPILER MATCHES ifort) - -#----------------------------------------------------------------------------- # Traverse source subdirectory #----------------------------------------------------------------------------- ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src) #----------------------------------------------------------------------------- -# When building utility executables we reuse these variables -#----------------------------------------------------------------------------- -#inherit EXE_EXT from parent HDF5 cmake project -#inherit MAKE_SYSTEM from parent HDF5 cmake project -#inherit CFG_INIT from parent HDF5 cmake project - -#----------------------------------------------------------------------------- # Build the Fortran Examples #----------------------------------------------------------------------------- IF (HDF5_BUILD_EXAMPLES) diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 4e7f208..5995c65 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -157,6 +157,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ DIRECT_VFD = @DIRECT_VFD@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNAMIC_DIRS = @DYNAMIC_DIRS@ @@ -218,6 +219,7 @@ LTLIBOBJS = @LTLIBOBJS@ LT_STATIC_EXEC = @LT_STATIC_EXEC@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ @@ -274,6 +276,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 6fe6cc7..b1a9b90 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -9,11 +9,6 @@ PROJECT (HDF5_F90_EXAMPLES C CXX Fortran) # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) -LINK_DIRECTORIES ( - ${CMAKE_Fortran_MODULE_DIRECTORY} - ${HDF5_F90_BINARY_DIR} - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -) #----------------------------------------------------------------------------- # Define Sources @@ -37,8 +32,8 @@ SET (examples FOREACH (example ${examples}) ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) - H5_NAMING (f90_ex_${example}) - TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example}) + H5_NAMING (f90_ex_${example} ${LIB_TYPE}) + TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_${example} "") IF (WIN32 AND NOT CYGWIN) SET_PROPERTY (TARGET f90_ex_${example} APPEND PROPERTY COMPILE_DEFINITIONS @@ -50,12 +45,17 @@ FOREACH (example ${examples}) ${HDF5_LIB_TARGET} ) SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) + + IF (BUILD_TESTING) + ADD_TEST (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>) + ENDIF (BUILD_TESTING) + ENDFOREACH (example ${examples}) IF (H5_HAVE_PARALLEL) ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) - H5_NAMING (f90_ex_ph5example) - TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example) + H5_NAMING (f90_ex_ph5example ${LIB_TYPE}) + TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example "") IF (WIN32 AND NOT CYGWIN) SET_PROPERTY (TARGET f90_ex_ph5example APPEND PROPERTY COMPILE_DEFINITIONS @@ -67,4 +67,9 @@ IF (H5_HAVE_PARALLEL) ${HDF5_LIB_TARGET} ) SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran) + + IF (BUILD_TESTING) + ADD_TEST (NAME f90_ex_ph5example COMMAND $<TARGET_FILE:f90_ex_ph5example>) + ENDIF (BUILD_TESTING) + ENDIF (H5_HAVE_PARALLEL) diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 5d76c0b..b3a123d 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -120,6 +120,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ DIRECT_VFD = @DIRECT_VFD@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNAMIC_DIRS = @DYNAMIC_DIRS@ @@ -181,6 +182,7 @@ LTLIBOBJS = @LTLIBOBJS@ LT_STATIC_EXEC = @LT_STATIC_EXEC@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ @@ -237,6 +239,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 2af57c1..d5cbc1b 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -74,6 +74,7 @@ ADD_CUSTOM_COMMAND ( DEPENDS H5fortran_detect ) +INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) #----------------------------------------------------------------------------- ADD_EXECUTABLE (H5match_types ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @@ -184,6 +185,7 @@ ENDIF (H5_HAVE_PARALLEL) # Add Main fortran library #----------------------------------------------------------------------------- ADD_LIBRARY (${HDF5_F90_LIB_TARGET} ${LIB_TYPE} ${f90_F_SRCS}) +SET (SHARED_LINK_FLAGS " ") IF (WIN32 AND NOT CYGWIN) IF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET} @@ -191,11 +193,7 @@ IF (WIN32 AND NOT CYGWIN) BUILD_HDF5_DLL ) IF (MSVC) - SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} - PROPERTIES - COMPILE_FLAGS "/dll" - LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def" - ) + SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def") ENDIF (MSVC) ENDIF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET} @@ -203,6 +201,7 @@ IF (WIN32 AND NOT CYGWIN) HDF5F90_WINDOWS ) ENDIF (WIN32 AND NOT CYGWIN) +TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_LIB_TARGET} ${SHARED_LINK_FLAGS}) SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran) TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c index 1570bb3..3cfc9e3 100644 --- a/fortran/src/H5Ff.c +++ b/fortran/src/H5Ff.c @@ -47,37 +47,36 @@ nh5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, h * Define access flags */ c_access_flags = (unsigned) *access_flags; + /* * Define creation property */ c_crt_prp = *crt_prp; -/* - if ( H5P_DEFAULT_F == c_crt_prp ) c_crt_prp = H5P_DEFAULT; -*/ + /* * Define access property */ c_acc_prp = *acc_prp; -/* - if ( H5P_DEFAULT_F == c_acc_prp ) c_acc_prp = H5P_DEFAULT; -*/ /* * Convert FORTRAN name to C name */ c_namelen = *namelen; c_name = (char *)HD5f2cstring(name, (size_t)c_namelen); - if (c_name == NULL) return ret_value; + if(c_name == NULL) + return ret_value; /* * Call H5Fcreate function. */ c_file_id = H5Fcreate(c_name, c_access_flags, c_crt_prp, c_acc_prp); - if (c_file_id < 0) return ret_value; - *file_id = c_file_id; + if (c_file_id >= 0) { + ret_value = 0; + *file_id = c_file_id; + } + HDfree(c_name); - ret_value = 0; return ret_value; } @@ -238,31 +237,31 @@ nh5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hi * Define access flags */ c_access_flags = (unsigned) *access_flags; + /* * Define access property */ c_acc_prp = *acc_prp; -/* - if ( H5P_DEFAULT_F == c_acc_prp ) c_acc_prp = H5P_DEFAULT; -*/ /* * Convert FORTRAN name to C name */ c_namelen = *namelen; c_name = (char *)HD5f2cstring(name, (size_t)c_namelen); - if (c_name == NULL) return ret_value; + if(c_name == NULL) + return ret_value; /* * Call H5Fopen function. */ c_file_id = H5Fopen(c_name, c_access_flags, c_acc_prp); - if (c_file_id < 0) return ret_value; - *file_id = (hid_t_f)c_file_id; + if(c_file_id >= 0) { + ret_value = 0; + *file_id = (hid_t_f)c_file_id; + } /* end if */ HDfree(c_name); - ret_value = 0; return ret_value; } diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 59f4535..c971d5e 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -394,7 +394,7 @@ done: * Modifications: N/A *---------------------------------------------------------------------------*/ int_f -nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, +nh5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id) @@ -406,16 +406,16 @@ nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, /* * Convert FORTRAN name to C name */ - if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL) - HGOTO_DONE(FAIL); + if(NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen))) + HGOTO_DONE(FAIL); + /* * Call H5Linfo function. */ if(H5Lget_info((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL); + HGOTO_DONE(FAIL); /* Unpack the structure */ - *cset = (int_f)link_buff.cset; *corder = (int_f)link_buff.corder; *corder_valid = 0; @@ -425,6 +425,9 @@ nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, *val_size = (size_t_f)link_buff.u.val_size; done: + if(c_link_name) + HDfree(c_link_name); + return ret_value; } diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index a472ec7..c5a16bc 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -209,6 +209,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ DIRECT_VFD = @DIRECT_VFD@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNAMIC_DIRS = @DYNAMIC_DIRS@ @@ -270,6 +271,7 @@ LTLIBOBJS = @LTLIBOBJS@ LT_STATIC_EXEC = @LT_STATIC_EXEC@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ @@ -326,6 +328,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ @@ -436,7 +439,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 69 +LT_VERS_REVISION = 70 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index a536c2e..df370bf 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -5,19 +5,11 @@ PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) -LINK_DIRECTORIES ( - ${CMAKE_Fortran_MODULE_DIRECTORY} - ${HDF5_F90_BINARY_DIR} - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -) #----------------------------------------------------------------------------- # Add Test Lib #----------------------------------------------------------------------------- ADD_LIBRARY (${HDF5_F90_C_TEST_LIB_TARGET} ${LIB_TYPE} t.c) -# Must explicity add a dependency here to force the generation of headers -# which are created for ${HDF5_F90_C_LIB_TARGET} -#ADD_DEPENDENCIES(${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ) TARGET_LINK_LIBRARIES (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} @@ -25,11 +17,7 @@ TARGET_LINK_LIBRARIES (${HDF5_F90_C_TEST_LIB_TARGET} H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} ${LIB_TYPE}) ADD_LIBRARY (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90) -# Must explicity add a dependency here to force the generation of headers -# which are created for ${HDF5_F90_C_LIB_TARGET} -ADD_DEPENDENCIES(${HDF5_F90_TEST_LIB_TARGET} - ${HDF5_F90_C_TEST_LIB_TARGET} -) +SET (SHARED_LINK_FLAGS " ") IF (WIN32 AND NOT CYGWIN) IF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET} @@ -37,11 +25,7 @@ IF (WIN32 AND NOT CYGWIN) BUILD_HDF5_DLL ) IF (MSVC) - SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} - PROPERTIES - COMPILE_FLAGS "/dll" - LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL" - ) + SET (SHARED_LINK_FLAGS "/DLL") ENDIF (MSVC) ENDIF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_TEST_LIB_TARGET} @@ -49,6 +33,7 @@ IF (WIN32 AND NOT CYGWIN) HDF5F90_WINDOWS ) ENDIF (WIN32 AND NOT CYGWIN) +TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} ${SHARED_LINK_FLAGS}) SET_TARGET_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran) TARGET_LINK_LIBRARIES (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} ${LIB_TYPE}) @@ -74,8 +59,8 @@ ADD_EXECUTABLE (testhdf5_fortran tH5VL.f90 tH5Z.f90 ) -H5_NAMING (testhdf5_fortran) -TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran) +H5_NAMING (testhdf5_fortran ${LIB_TYPE}) +TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran "") TARGET_LINK_LIBRARIES (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -96,8 +81,8 @@ ADD_EXECUTABLE (testhdf5_fortran_1_8 tH5A_1_8.f90 tH5G_1_8.f90 ) -H5_NAMING (testhdf5_fortran_1_8) -TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran_1_8) +H5_NAMING (testhdf5_fortran_1_8 ${LIB_TYPE}) +TARGET_FORTRAN_WIN_PROPERTIES (testhdf5_fortran_1_8 "") TARGET_LINK_LIBRARIES (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} @@ -112,8 +97,8 @@ ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>) #-- Adding test for fflush1 ADD_EXECUTABLE (fflush1 fflush1.f90) -H5_NAMING (fflush1) -TARGET_FORTRAN_WIN_PROPERTIES (fflush1) +H5_NAMING (fflush1 ${LIB_TYPE}) +TARGET_FORTRAN_WIN_PROPERTIES (fflush1 "") TARGET_LINK_LIBRARIES (fflush1 ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} @@ -128,8 +113,8 @@ ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>) #-- Adding test for fflush2 ADD_EXECUTABLE (fflush2 fflush2.f90) -H5_NAMING (fflush2) -TARGET_FORTRAN_WIN_PROPERTIES (fflush2) +H5_NAMING (fflush2 ${LIB_TYPE}) +TARGET_FORTRAN_WIN_PROPERTIES (fflush2 "") TARGET_LINK_LIBRARIES (fflush2 ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 4c0b03f..6fdfdf4 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -190,6 +190,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ DIRECT_VFD = @DIRECT_VFD@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNAMIC_DIRS = @DYNAMIC_DIRS@ @@ -251,6 +252,7 @@ LTLIBOBJS = @LTLIBOBJS@ LT_STATIC_EXEC = @LT_STATIC_EXEC@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ @@ -307,6 +309,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.f90 index 223877c..c48420e 100644 --- a/fortran/test/tH5A_1_8.f90 +++ b/fortran/test/tH5A_1_8.f90 @@ -158,13 +158,13 @@ SUBROUTINE attribute_test_1_8(cleanup, total_error) !!$ CALL test_attr_corder_transition(my_fcpl, my_fapl) !!$ CALL test_attr_corder_delete(my_fcpl, my_fapl) ret_total_error = 0 - CALL test_attr_info_by_idx(new_format, my_fcpl, my_fapl, ret_total_error) + CALL test_attr_info_by_idx(new_format(i), my_fcpl, my_fapl, ret_total_error) CALL write_test_status(ret_total_error, & ' - Testing querying attribute info by index', & total_error) ret_total_error = 0 - CALL test_attr_delete_by_idx(new_format, my_fcpl, my_fapl, ret_total_error) + CALL test_attr_delete_by_idx(new_format(i), my_fcpl, my_fapl, ret_total_error) CALL write_test_status(ret_total_error, & ' - Testing deleting attribute by index', & total_error) @@ -718,7 +718,7 @@ SUBROUTINE test_attr_create_by_name(new_format,fcpl,fapl, total_error) CALL check("h5aclose_f",error,total_error) ! /* Verify information for NEW attribute */ - CALL attr_info_by_idx_check(my_dataset, attrname, INT(u,HSIZE_T), use_index, total_error) + CALL attr_info_by_idx_check(my_dataset, attrname, INT(u,HSIZE_T), use_index(i), total_error) ! CALL check("FAILED IN attr_info_by_idx_check",total_error) ENDDO diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index edabb35..c94640a 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -5,11 +5,6 @@ PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) -LINK_DIRECTORIES ( - ${CMAKE_Fortran_MODULE_DIRECTORY} - ${HDF5_F90_BINARY_DIR} - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -) #----------------------------------------------------------------------------- # Add Tests @@ -21,8 +16,8 @@ ADD_EXECUTABLE (parallel_test hyper.f90 mdset.f90 ) -H5_NAMING (parallel_test) -TARGET_FORTRAN_WIN_PROPERTIES (parallel_test) +H5_NAMING (parallel_test ${LIB_TYPE}) +TARGET_FORTRAN_WIN_PROPERTIES (parallel_test "") TARGET_LINK_LIBRARIES (parallel_test ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index f2e70b4..e592160 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -143,6 +143,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@ DIRECT_VFD = @DIRECT_VFD@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DYNAMIC_DIRS = @DYNAMIC_DIRS@ @@ -204,6 +205,7 @@ LTLIBOBJS = @LTLIBOBJS@ LT_STATIC_EXEC = @LT_STATIC_EXEC@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MPE = @MPE@ MPI_GET_SIZE = @MPI_GET_SIZE@ @@ -260,6 +262,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ |