diff options
Diffstat (limited to 'fortran/src/CMakeLists.txt')
-rw-r--r-- | fortran/src/CMakeLists.txt | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 25e14ba..374bc44 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -2,6 +2,22 @@ cmake_minimum_required (VERSION 2.8.6) PROJECT (HDF5_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- +# configure def file for shared libs on windows +IF (WIN32 AND NOT CYGWIN) + IF (BUILD_SHARED_LIBS) + IF (MSVC) + IF (NOT H5_HAVE_PARALLEL) + SET (H5_NOPAREXP ";") + ENDIF (NOT H5_HAVE_PARALLEL) + IF (NOT HDF5_ENABLE_F2003) + SET (H5_NOF03EXP ";") + ENDIF (NOT HDF5_ENABLE_F2003) + CONFIGURE_FILE (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY) + ENDIF (MSVC) + ENDIF (BUILD_SHARED_LIBS) +ENDIF (WIN32 AND NOT CYGWIN) + +#----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities # H5test_kind(_SIZEOF).f90 used to generate H5fortran_detect.f90 # H5fortran_detect.f90 used to generate H5fort_type_defines.h @@ -126,13 +142,13 @@ SET_TARGET_PROPERTIES (${HDF5_F90_C_LIB_TARGET} PROPERTIES LINKER_LANGUAGE C) #----------------------------------------------------------------------------- # Fortran 2003 standard #----------------------------------------------------------------------------- -IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003) +IF (HDF5_ENABLE_F2003) # default real is 4 bytes, so include double signatures SET (F_STATUS "_F03") -ELSE (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003) +ELSE (HDF5_ENABLE_F2003) # default real is 8 bytes, so exclude double signatures SET (F_STATUS "_F90") -ENDIF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003) +ENDIF (HDF5_ENABLE_F2003) #----------------------------------------------------------------------------- # Fortran Real Size @@ -208,11 +224,7 @@ IF (WIN32 AND NOT CYGWIN) BUILD_HDF5_DLL ) IF (MSVC) - IF (H5_HAVE_PARALLEL) - SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/phdf5_fortrandll.def") - ELSE (H5_HAVE_PARALLEL) - SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def") - ENDIF (H5_HAVE_PARALLEL) + SET (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") ENDIF (MSVC) ENDIF (BUILD_SHARED_LIBS) SET_PROPERTY (TARGET ${HDF5_F90_LIB_TARGET} |