diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-11-04 18:45:41 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-11-04 18:45:41 (GMT) |
commit | 141383fb261f02c5fab510ffa9b2ff8be11f1cec (patch) | |
tree | afe2beaebfb2aea6750925c64f051a8fa98169de /fortran/src/CMakeLists.txt | |
parent | 9417e52b8be3453b60f7717ab33d42d7d91784a2 (diff) | |
download | hdf5-141383fb261f02c5fab510ffa9b2ff8be11f1cec.zip hdf5-141383fb261f02c5fab510ffa9b2ff8be11f1cec.tar.gz hdf5-141383fb261f02c5fab510ffa9b2ff8be11f1cec.tar.bz2 |
[svn-r21717] Update cmake configuration
Update cmake to generate source folders in VS
Brought parallel changes from trunk
Tested: local linux
Diffstat (limited to 'fortran/src/CMakeLists.txt')
-rw-r--r-- | fortran/src/CMakeLists.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index bb927eb..ec4d7d1 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -115,9 +115,10 @@ ENDIF (H5_HAVE_PARALLEL) SET_SOURCE_FILES_PROPERTIES (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C) ADD_LIBRARY (${HDF5_F90_C_LIB_TARGET} ${LIB_TYPE} ${f90CStub_C_SRCS}) -TARGET_LINK_LIBRARIES (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) +TARGET_LINK_LIBRARIES (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} ${LIB_TYPE}) +SET_TARGET_PROPERTIES (${HDF5_F90_C_LIB_TARGET} PROPERTIES FOLDER libraries/fortran) #----------------------------------------------------------------------------- # Fortran 2003 standard @@ -179,18 +180,18 @@ SET (f90_F_SRCS #----------------------------------------------------------------------------- # Add H5FDMPIO if parallel #----------------------------------------------------------------------------- -IF (H5_HAVE_PARALLEL) +IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) SET (f90_F_SRCS ${f90_F_SRCS} ${HDF5_F90_SRC_SOURCE_DIR}/HDF5mpio.f90 ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpioff.f90 ) -ELSE (H5_HAVE_PARALLEL) +ELSE (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) SET (f90_F_SRCS ${f90_F_SRCS} ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.f90 ) -ENDIF (H5_HAVE_PARALLEL) +ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) #----------------------------------------------------------------------------- # Add Main fortran library @@ -219,8 +220,12 @@ 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}) +IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) + TARGET_LINK_LIBRARIES (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES}) +ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} ${LIB_TYPE}) +SET_TARGET_PROPERTIES (${HDF5_F90_LIB_TARGET} PROPERTIES FOLDER libraries/fortran) #----------------------------------------------------------------------------- # Add file(s) to CMake Install |