From d4509ea9edb39583998a4ac0f85dde45e45afe75 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Sep 2011 09:17:27 -0500 Subject: [svn-r21422] Add 2003 examples to cmake build --- fortran/examples/CMakeLists.txt | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) 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 $) + 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 $) + 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}) -- cgit v0.12