diff options
Diffstat (limited to 'hl/fortran/src')
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 52 | ||||
-rwxr-xr-x | hl/fortran/src/H5LTf90proto.h | 4 |
2 files changed, 20 insertions, 36 deletions
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index ca0a35f..763a315 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -5,50 +5,39 @@ PROJECT(HDF5_HL_F90_SRC C CXX Fortran) # Setup include Directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES ( - ${CMAKE_Fortran_MODULE_DIRECTORY} - ${HDF5_F90_BINARY_DIR} - ${HDF5_F90_SRC_DIR}/src - ${HDF5_F90_SRC_BINARY_DIR} - ${HDF5_HL_F90_SRC_SOURCE_DIR} ${HDF5_HL_SRC_DIR}/src + ${HDF5_F90_SRC_DIR}/src + ${HDF5_F90_BINARY_DIR + ${CMAKE_Fortran_MODULE_DIRECTORY}} ) -LINK_DIRECTORIES ( - ${CMAKE_Fortran_MODULE_DIRECTORY} - ${HDF5_HL_F90_BINARY_DIR} - ${HDF5_F90_BINARY_DIR} - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} -) + #----------------------------------------------------------------------------- -# List Source files +# hl_f90CStub lib #----------------------------------------------------------------------------- -SET (HDF5_HL_F90_F_SRCS - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90 - ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90 -) - SET (HDF5_HL_F90_C_SRCS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTfc.c ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMfc.c ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMcc.c ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBfc.c ) +SET_SOURCE_FILES_PROPERTIES (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C) SET (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) +SET_SOURCE_FILES_PROPERTIES (${HDF5_HL_F90_HEADERS} PROPERTIES LANGUAGE C) ADD_LIBRARY (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) -TARGET_LINK_LIBRARIES (${HDF5_HL_F90_C_LIB_TARGET} - ${HDF5_F90_C_LIB_TARGET} - ${HDF5_HL_LIB_TARGET} -) -# -# To Ensure that generated files are built, we must force a dependency -ADD_DEPENDENCIES(${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET}) +TARGET_LINK_LIBRARIES (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) +SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") +H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE}) -SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT - "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}" +#----------------------------------------------------------------------------- +# Fortran Modules +#----------------------------------------------------------------------------- +SET (HDF5_HL_F90_F_SRCS + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.f90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.f90 + ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.f90 ) -H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE}) ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) SET (SHARED_LINK_FLAGS " ") @@ -71,18 +60,13 @@ IF (WIN32 AND NOT CYGWIN) ENDIF (WIN32 AND NOT CYGWIN) TARGET_FORTRAN_WIN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${SHARED_LINK_FLAGS}) SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran) -TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET} - ${HDF5_HL_F90_C_LIB_TARGET} - ${HDF5_F90_LIB_TARGET} -) +TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE}) -ADD_DEPENDENCIES (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET}) #----------------------------------------------------------------------------- # Add file(s) to CMake Install #----------------------------------------------------------------------------- - INSTALL ( DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE}/ diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 3e45531..c0de5ea 100755 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -23,8 +23,8 @@ #include <string.h> -HDF5_HL_F90CSTUBDLL char* HD5f2cstring (_fcd fdesc, int len); -HDF5_HL_F90CSTUBDLL void HD5packFstring (char *src, char *dest, size_t len); +H5_FCDLL char* HD5f2cstring (_fcd fdesc, int len); +H5_FCDLL void HD5packFstring (char *src, char *dest, size_t len); /* |