diff options
Diffstat (limited to 'hl/fortran')
-rw-r--r-- | hl/fortran/CMakeLists.txt | 41 | ||||
-rw-r--r-- | hl/fortran/Makefile.in | 2 | ||||
-rw-r--r-- | hl/fortran/examples/CMakeLists.txt | 44 | ||||
-rw-r--r-- | hl/fortran/examples/Makefile.in | 2 | ||||
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 100 | ||||
-rw-r--r-- | hl/fortran/src/H5IMcc.h | 2 | ||||
-rw-r--r-- | hl/fortran/src/Makefile.in | 4 | ||||
-rw-r--r-- | hl/fortran/test/CMakeLists.txt | 85 | ||||
-rw-r--r-- | hl/fortran/test/Makefile.in | 2 |
9 files changed, 276 insertions, 6 deletions
diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt new file mode 100644 index 0000000..1aca0d7 --- /dev/null +++ b/hl/fortran/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required (VERSION 2.8) +PROJECT(HDF5_HL_F90 C CXX Fortran) + +#----------------------------------------------------------------------------- +# Setup include Directories +#----------------------------------------------------------------------------- +INCLUDE_DIRECTORIES (${HDF5_F90_SOURCE_DIR}/src) +INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR}) +INCLUDE_DIRECTORIES (${HDF5_F90_SRC_BINARY_DIR}) +INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY}) + +LINK_DIRECTORIES (${HDF5_SRC_DIR} ${HDF5_FORTRAN_SOURCE_DIR} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) + +#----------------------------------------------------------------------------- +# 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) + +#----------------------------------------------------------------------------- +# List Source files +#----------------------------------------------------------------------------- +ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src) + +#----------------------------------------------------------------------------- +# Build the HL Fortran Examples +#----------------------------------------------------------------------------- +IF (HDF5_BUILD_FORTRAN_EXAMPLES) + ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples) +ENDIF (HDF5_BUILD_FORTRAN_EXAMPLES) + +#----------------------------------------------------------------------------- +# Testing +#----------------------------------------------------------------------------- +IF (BUILD_TESTING) + ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test) +ENDIF (BUILD_TESTING) diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index 799edee..c382dbd 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -203,12 +203,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LINUX_LFS = @LINUX_LFS@ LIPO = @LIPO@ LL_PATH = @LL_PATH@ LN_S = @LN_S@ diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt new file mode 100644 index 0000000..bd9a695 --- /dev/null +++ b/hl/fortran/examples/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required (VERSION 2.8) +PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran) + +#----------------------------------------------------------------------------- +# Setup include Directories +#----------------------------------------------------------------------------- +INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SOURCE_DIR}/src) +LINK_DIRECTORIES ( + ${CMAKE_Fortran_MODULE_DIRECTORY} + ${HDF5_HL_F90_BINARY_DIR} + ${HDF5_F90_BINARY_DIR} + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +) + +SET (examples + exlite +) + +FOREACH (example ${examples}) + ADD_EXECUTABLE (hl_f90_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.f90) + H5_NAMING (hl_f90_ex_${example}) + IF (WIN32) + IF (MSVC) + IF (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (hl_f90_ex_${example} + PROPERTIES + COMPILE_FLAGS "/dll" + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) + ELSE (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (hl_f90_ex_${example} + PROPERTIES + LINK_FLAGS "/NODEFAULTLIB:MSVCRT" + ) + ENDIF (BUILD_SHARED_LIBS) + ENDIF (MSVC) + ENDIF (WIN32) + TARGET_LINK_LIBRARIES (hl_f90_ex_${example} + ${HDF5_HL_F90_LIB_TARGET} + ${HDF5_F90_LIB_TARGET} + ${HDF5_LIB_TARGET} + ) + SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) +ENDFOREACH (example ${examples}) diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 3abc2dd..5e5584f 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -165,12 +165,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LINUX_LFS = @LINUX_LFS@ LIPO = @LIPO@ LL_PATH = @LL_PATH@ LN_S = @LN_S@ diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt new file mode 100644 index 0000000..71302f3 --- /dev/null +++ b/hl/fortran/src/CMakeLists.txt @@ -0,0 +1,100 @@ +cmake_minimum_required (VERSION 2.8) +PROJECT(HDF5_HL_F90_SRC C CXX Fortran) + +#----------------------------------------------------------------------------- +# Setup include Directories +#----------------------------------------------------------------------------- +INCLUDE_DIRECTORIES ( + ${CMAKE_Fortran_MODULE_DIRECTORY} + ${HDF5_F90_BINARY_DIR} + ${HDF5_F90_SOURCE_DIR}/src + ${HDF5_F90_SRC_BINARY_DIR} + ${HDF5_HL_F90_SRC_SOURCE_DIR} + ${HDF5_HL_SOURCE_DIR}/src +) +LINK_DIRECTORIES ( + ${CMAKE_Fortran_MODULE_DIRECTORY} + ${HDF5_HL_F90_BINARY_DIR} + ${HDF5_F90_BINARY_DIR} + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +) +#----------------------------------------------------------------------------- +# List Source files +#----------------------------------------------------------------------------- +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 (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) + +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}) + +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}) + +ADD_LIBRARY (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS}) +IF (BUILD_SHARED_LIBS) + IF (WIN32) + SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS + BUILD_HDF5_DLL + ) + IF (MSVC) + SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} + PROPERTIES + COMPILE_FLAGS "/dll" + LINK_FLAGS "/SUBSYSTEM:CONSOLE /DLL" + ) + ENDIF (MSVC) + ENDIF (WIN32) +ENDIF (BUILD_SHARED_LIBS) +IF (WIN32) + SET_PROPERTY (TARGET ${HDF5_HL_F90_LIB_TARGET} + APPEND PROPERTY COMPILE_DEFINITIONS + HDF5F90_WINDOWS + ) + SET_TARGET_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} PROPERTIES LINKER_LANGUAGE Fortran) +ENDIF (WIN32) +SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT + "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}" +) +TARGET_LINK_LIBRARIES (${HDF5_HL_F90_LIB_TARGET} + ${HDF5_HL_F90_C_LIB_TARGET} + ${HDF5_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 Target(s) to CMake Install for import into other projects +#----------------------------------------------------------------------------- +IF (HDF5_EXPORTED_TARGETS) + INSTALL ( + TARGETS + ${HDF5_HL_F90_C_LIB_TARGET} + ${HDF5_HL_F90_LIB_TARGET} + EXPORT + ${HDF5_EXPORTED_TARGETS} + LIBRARY DESTINATION lib COMPONENT hlfortlibraries + ARCHIVE DESTINATION lib COMPONENT hlfortlibraries + RUNTIME DESTINATION bin COMPONENT hlfortlibraries + ) +ENDIF (HDF5_EXPORTED_TARGETS) diff --git a/hl/fortran/src/H5IMcc.h b/hl/fortran/src/H5IMcc.h index 9f70bac..0b8a345 100644 --- a/hl/fortran/src/H5IMcc.h +++ b/hl/fortran/src/H5IMcc.h @@ -18,7 +18,7 @@ #include "H5LTprivate.h" #include "H5IMprivate.h" -#include "../../fortran/src/H5f90i_gen.h" +#include "H5f90i_gen.h" #ifdef __cplusplus extern "C" { diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index a01bcfa..bf1fe89 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -220,12 +220,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LINUX_LFS = @LINUX_LFS@ LIPO = @LIPO@ LL_PATH = @LL_PATH@ LN_S = @LN_S@ @@ -389,7 +389,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 = 59 +LT_VERS_REVISION = 63 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt new file mode 100644 index 0000000..14bd622 --- /dev/null +++ b/hl/fortran/test/CMakeLists.txt @@ -0,0 +1,85 @@ +cmake_minimum_required (VERSION 2.8) +PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) + +#----------------------------------------------------------------------------- +# Add Tests +#----------------------------------------------------------------------------- +INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SOURCE_DIR}/src) +LINK_DIRECTORIES ( + ${CMAKE_Fortran_MODULE_DIRECTORY} + ${HDF5_HL_F90_BINARY_DIR} + ${HDF5_F90_BINARY_DIR} + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} +) + +#-- Adding test for hl_f90_tstlite +ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90) +H5_NAMING (hl_f90_tstlite) +IF (WIN32) + IF (MSVC) + IF (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (hl_f90_tstlite + PROPERTIES + COMPILE_FLAGS "/dll" + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) + ELSE (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (hl_f90_tstlite + PROPERTIES + LINK_FLAGS "/NODEFAULTLIB:MSVCRT" + ) + ENDIF (BUILD_SHARED_LIBS) + ENDIF (MSVC) +ENDIF (WIN32) +TARGET_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) +SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran) + +ADD_TEST (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>) + +#-- Adding test for hl_f90_tstimage +ADD_EXECUTABLE (hl_f90_tstimage tstimage.f90) +H5_NAMING (hl_f90_tstimage) +IF (WIN32) + IF (MSVC) + IF (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (hl_f90_tstimage + PROPERTIES + COMPILE_FLAGS "/dll" + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) + ELSE (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (hl_f90_tstimage + PROPERTIES + LINK_FLAGS "/NODEFAULTLIB:MSVCRT" + ) + ENDIF (BUILD_SHARED_LIBS) + ENDIF (MSVC) +ENDIF (WIN32) +TARGET_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) +SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran) + +ADD_TEST (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>) + +#-- Adding test for hl_f90_tsttable +ADD_EXECUTABLE (hl_f90_tsttable tsttable.f90) +H5_NAMING (hl_f90_tsttable) +IF (WIN32) + IF (MSVC) + IF (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (hl_f90_tsttable + PROPERTIES + COMPILE_FLAGS "/dll" + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) + ELSE (BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (hl_f90_tsttable + PROPERTIES + LINK_FLAGS "/NODEFAULTLIB:MSVCRT" + ) + ENDIF (BUILD_SHARED_LIBS) + ENDIF (MSVC) +ENDIF (WIN32) +TARGET_LINK_LIBRARIES (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) +SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran) + +ADD_TEST (NAME hl_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>) diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 6ff5d02..1f73b79 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -194,12 +194,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTRUMENT = @INSTRUMENT@ INSTRUMENT_LIBRARY = @INSTRUMENT_LIBRARY@ +LARGEFILE = @LARGEFILE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ -LINUX_LFS = @LINUX_LFS@ LIPO = @LIPO@ LL_PATH = @LL_PATH@ LN_S = @LN_S@ |