diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-09-27 14:17:27 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-09-27 14:17:27 (GMT) |
commit | d4509ea9edb39583998a4ac0f85dde45e45afe75 (patch) | |
tree | 41f4d17ad316f10ac9658b3574847249ead24349 | |
parent | cb06ebf08d957fec0cbad773e7e2353c66f03dbf (diff) | |
download | hdf5-d4509ea9edb39583998a4ac0f85dde45e45afe75.zip hdf5-d4509ea9edb39583998a4ac0f85dde45e45afe75.tar.gz hdf5-d4509ea9edb39583998a4ac0f85dde45e45afe75.tar.bz2 |
[svn-r21422] Add 2003 examples to cmake build
-rw-r--r-- | fortran/examples/CMakeLists.txt | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index ee459e1..6ecfd37 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -30,6 +30,13 @@ SET (examples compound ) +SET (F2003_examples + rwdset_fortran2003 + nested_derived_type + compound_fortran2003 + compound_complex_fortran2003 +) + FOREACH (example ${examples}) ADD_EXECUTABLE (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) TARGET_NAMING (f90_ex_${example} ${LIB_TYPE}) @@ -37,7 +44,7 @@ FOREACH (example ${examples}) IF (WIN32 AND NOT CYGWIN) SET_PROPERTY (TARGET f90_ex_${example} APPEND PROPERTY COMPILE_DEFINITIONS - HDF5F90_WINDOWS + HDF5F90_WINDOWS ) ENDIF (WIN32 AND NOT CYGWIN) TARGET_LINK_LIBRARIES (f90_ex_${example} @@ -48,10 +55,41 @@ FOREACH (example ${examples}) IF (BUILD_TESTING) ADD_TEST (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (f90_ex_${example} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "f90_ex_${example}") ENDIF (BUILD_TESTING) ENDFOREACH (example ${examples}) +FOREACH (example ${F2003_examples}) + ADD_EXECUTABLE (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90) + TARGET_NAMING (f03_ex_${example} ${LIB_TYPE}) + TARGET_FORTRAN_WIN_PROPERTIES (f03_ex_${example} "") + IF (WIN32 AND NOT CYGWIN) + SET_PROPERTY (TARGET f03_ex_${example} + APPEND PROPERTY COMPILE_DEFINITIONS + HDF5F90_WINDOWS + ) + ENDIF (WIN32 AND NOT CYGWIN) + TARGET_LINK_LIBRARIES (f03_ex_${example} + ${HDF5_F90_LIB_TARGET} + ${HDF5_LIB_TARGET} + ) + SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran) + + IF (BUILD_TESTING) + ADD_TEST (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (f03_ex_${example} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "f03_ex_${example}") + ENDIF (BUILD_TESTING) + +ENDFOREACH (example ${F2003_examples}) + + IF (H5_HAVE_PARALLEL) ADD_EXECUTABLE (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90) TARGET_NAMING (f90_ex_ph5example ${LIB_TYPE}) |