summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2014-06-17 20:40:01 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2014-06-17 20:40:01 (GMT)
commit611d2c89afa02204e6321849d24aed26878097f0 (patch)
tree806802afc30a3a212d94b47ad661fd3b8c91a0df /examples
parent720e0c7623be9847867b9d857329ab626ee8f3e8 (diff)
downloadhdf5-611d2c89afa02204e6321849d24aed26878097f0.zip
hdf5-611d2c89afa02204e6321849d24aed26878097f0.tar.gz
hdf5-611d2c89afa02204e6321849d24aed26878097f0.tar.bz2
[svn-r25307] Bring revisions #24698 - #24783 from trunk to revise_chunks.
Tested on jam, koala, ostrich, platypus.
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt30
-rw-r--r--examples/CMakeTests.cmake38
2 files changed, 34 insertions, 34 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index e7a1326..088a238 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -4,12 +4,12 @@ PROJECT (HDF5_EXAMPLES)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (examples
+set (examples
h5_crtdat
h5_rdwt
h5_crtatt
@@ -36,22 +36,22 @@ SET (examples
h5_shared_mesg
)
-FOREACH (example ${examples})
- ADD_EXECUTABLE (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
+foreach (example ${examples})
+ add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
TARGET_NAMING (${example} ${LIB_TYPE})
TARGET_C_PROPERTIES (${example} " " " ")
- TARGET_LINK_LIBRARIES (${example} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (${example} PROPERTIES FOLDER examples)
-ENDFOREACH (example ${examples})
+ target_link_libraries (${example} ${HDF5_LIB_TARGET})
+ set_target_properties (${example} PROPERTIES FOLDER examples)
+endforeach (example ${examples})
-IF (H5_HAVE_PARALLEL)
- ADD_EXECUTABLE (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
+if (H5_HAVE_PARALLEL)
+ add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
TARGET_NAMING (ph5example ${LIB_TYPE})
TARGET_C_PROPERTIES (ph5example " " " ")
- TARGET_LINK_LIBRARIES (ph5example ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (ph5example PROPERTIES FOLDER examples)
-ENDIF (H5_HAVE_PARALLEL)
+ target_link_libraries (ph5example ${HDF5_LIB_TARGET})
+ set_target_properties (ph5example PROPERTIES FOLDER examples)
+endif (H5_HAVE_PARALLEL)
-IF (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+if (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index 58a2858..9f51d74 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -7,7 +7,7 @@
FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w)
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME EXAMPLES-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -43,23 +43,23 @@
red/prefix_target.h5
u2w/u2w_target.h5
)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-clear-objects")
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "EXAMPLES-clear-objects")
- FOREACH (example ${examples})
- ADD_TEST (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-${example}")
- ENDFOREACH (example ${examples})
+ foreach (example ${examples})
+ add_test (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "EXAMPLES-${example}")
+ endforeach (example ${examples})
- IF (H5_HAVE_PARALLEL)
- ADD_TEST (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-ph5example")
- ENDIF (H5_HAVE_PARALLEL)
+ if (H5_HAVE_PARALLEL)
+ add_test (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "EXAMPLES-ph5example")
+ endif (H5_HAVE_PARALLEL)