diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-01-31 17:30:34 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-01-31 17:30:34 (GMT) |
commit | 13693b307c08f962d5416316b1c154bb0058529a (patch) | |
tree | 58b31c633ccd8181d94c0cc8ae9dfee8d7098561 /fortran/src/CMakeLists.txt | |
parent | bf473b40f57317fa60640f44c735133f58023f6a (diff) | |
download | hdf5-13693b307c08f962d5416316b1c154bb0058529a.zip hdf5-13693b307c08f962d5416316b1c154bb0058529a.tar.gz hdf5-13693b307c08f962d5416316b1c154bb0058529a.tar.bz2 |
[svn-r23211] Merge trunk CMake changes for minimum cmake version of 2.8.10. This was prompted by HDFFV-8227, OS X requires latest version of cmake for proper support.
Tested: local linux
Diffstat (limited to 'fortran/src/CMakeLists.txt')
-rw-r--r-- | fortran/src/CMakeLists.txt | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 25e14ba..3a47233 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,7 +1,23 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) 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 @@ -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} |