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/examples/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/examples/CMakeLists.txt')
-rw-r--r-- | fortran/examples/CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index 47c221c..8f858a3 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -52,6 +52,7 @@ FOREACH (example ${examples}) ${HDF5_LIB_TARGET} ) SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) + SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES FOLDER examples/fortran) IF (BUILD_TESTING) ADD_TEST (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>) @@ -78,6 +79,7 @@ IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003) ${HDF5_LIB_TARGET} ) SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) + SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES FOLDER examples/fortran03) IF (BUILD_TESTING) ADD_TEST (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>) @@ -89,7 +91,7 @@ IF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003) ENDFOREACH (example ${F2003_examples}) ENDIF (FORTRAN_HAVE_ISO_C_BINDING AND HDF5_ENABLE_F2003) -IF (H5_HAVE_PARALLEL) +IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE}) TARGET_FORTRAN_WIN_PROPERTIES (f90_ex_ph5example "") @@ -102,11 +104,13 @@ IF (H5_HAVE_PARALLEL) TARGET_LINK_LIBRARIES (f90_ex_ph5example ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} + ${MPI_Fortran_LIBRARIES} ) SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran) + SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES FOLDER examples/fortran) IF (BUILD_TESTING) - ADD_TEST (NAME f90_ex_ph5example COMMAND $<TARGET_FILE:f90_ex_ph5example>) + ADD_TEST (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>) ENDIF (BUILD_TESTING) -ENDIF (H5_HAVE_PARALLEL) +ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND) |