diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-08-21 22:13:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 22:13:03 (GMT) |
commit | ceef4a9ebd055f9ec0378a97ec2ce9421cdec866 (patch) | |
tree | 887ab50783fb357f8c5f9fe0dee1d6ba5dc536a5 /examples | |
parent | 89b4afd4b317c5131cbc8607c99d21b369d050eb (diff) | |
download | hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.zip hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.gz hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.bz2 |
Merge/update CMake, presets,java and tools (#3393)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CMakeLists.txt | 4 | ||||
-rw-r--r-- | examples/CMakeTests.cmake | 15 | ||||
-rw-r--r-- | examples/h5_cmprss.c | 2 | ||||
-rw-r--r-- | examples/h5_crtatt.c | 2 | ||||
-rw-r--r-- | examples/h5_crtdat.c | 2 | ||||
-rw-r--r-- | examples/h5_crtgrp.c | 2 | ||||
-rw-r--r-- | examples/h5_crtgrpar.c | 2 | ||||
-rw-r--r-- | examples/h5_crtgrpd.c | 2 | ||||
-rw-r--r-- | examples/h5_extlink.c | 6 | ||||
-rw-r--r-- | examples/h5_rdwt.c | 2 | ||||
-rw-r--r-- | examples/testh5cc.sh.in | 8 |
11 files changed, 24 insertions, 23 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index f453467..371dea8 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -52,7 +52,7 @@ endif () foreach (example ${examples}) add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c) - target_include_directories (${example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + target_include_directories (${example} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${example} STATIC) target_link_libraries (${example} PRIVATE ${HDF5_LIB_TARGET}) @@ -73,7 +73,7 @@ endforeach () if (H5_HAVE_PARALLEL) foreach (parallel_example ${parallel_examples}) add_executable (${parallel_example} ${HDF5_EXAMPLES_SOURCE_DIR}/${parallel_example}.c) - target_include_directories (${parallel_example} PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + target_include_directories (${parallel_example} PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${parallel_example} STATIC) target_link_libraries (${parallel_example} PRIVATE ${HDF5_LIB_TARGET} MPI::MPI_C) diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 6c84d1d..30f73c4 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -70,7 +70,18 @@ if (HDF5_TEST_SERIAL) NAME EXAMPLES-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES} ) - set_tests_properties (EXAMPLES-clear-objects PROPERTIES FIXTURES_SETUP clear_EXAMPLES) + set_tests_properties (EXAMPLES-clear-objects PROPERTIES + FIXTURES_SETUP clear_EXAMPLES + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + ) + add_test ( + NAME EXAMPLES-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_CLEANFILES} + ) + set_tests_properties (EXAMPLES-clean-objects PROPERTIES + FIXTURES_CLEANUP clear_EXAMPLES + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + ) foreach (example ${examples}) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -83,7 +94,6 @@ if (HDF5_TEST_SERIAL) -D "TEST_EXPECT=0" -D "TEST_SKIP_COMPARE=TRUE" -D "TEST_OUTPUT=${example}.txt" - #-D "TEST_REFERENCE=${example}.out" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -P "${HDF_RESOURCES_DIR}/runTest.cmake" ) @@ -113,7 +123,6 @@ if (H5_HAVE_PARALLEL AND HDF5_TEST_PARALLEL AND NOT WIN32) -D "TEST_SKIP_COMPARE=TRUE" -D "TEST_OUTPUT=${parallel_example}.out" -D "TEST_REFERENCE:STRING=PHDF5 example finished with no errors" - #-D "TEST_FILTER:STRING=PHDF5 tests finished with no errors" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -P "${HDF_RESOURCES_DIR}/grepTest.cmake" ) diff --git a/examples/h5_cmprss.c b/examples/h5_cmprss.c index 9aefe32..ffd3191 100644 --- a/examples/h5_cmprss.c +++ b/examples/h5_cmprss.c @@ -23,7 +23,7 @@ #define DIM1 20 int -main() +main(void) { hid_t file_id, dataset_id, dataspace_id; /* identifiers */ diff --git a/examples/h5_crtatt.c b/examples/h5_crtatt.c index f33e1f1..8534703f 100644 --- a/examples/h5_crtatt.c +++ b/examples/h5_crtatt.c @@ -19,7 +19,7 @@ #define FILE "dset.h5" int -main() +main(void) { hid_t file_id, dataset_id, attribute_id, dataspace_id; /* identifiers */ diff --git a/examples/h5_crtdat.c b/examples/h5_crtdat.c index 8de9077..d8ac072 100644 --- a/examples/h5_crtdat.c +++ b/examples/h5_crtdat.c @@ -19,7 +19,7 @@ #define FILE "dset.h5" int -main() +main(void) { hid_t file_id, dataset_id, dataspace_id; /* identifiers */ diff --git a/examples/h5_crtgrp.c b/examples/h5_crtgrp.c index f9066f4..3517bf3 100644 --- a/examples/h5_crtgrp.c +++ b/examples/h5_crtgrp.c @@ -19,7 +19,7 @@ #define FILE "group.h5" int -main() +main(void) { hid_t file_id, group_id; /* identifiers */ diff --git a/examples/h5_crtgrpar.c b/examples/h5_crtgrpar.c index f397155..1b47429 100644 --- a/examples/h5_crtgrpar.c +++ b/examples/h5_crtgrpar.c @@ -19,7 +19,7 @@ #define FILE "groups.h5" int -main() +main(void) { hid_t file_id, group1_id, group2_id, group3_id; /* identifiers */ diff --git a/examples/h5_crtgrpd.c b/examples/h5_crtgrpd.c index 364a3b9..f1750d6 100644 --- a/examples/h5_crtgrpd.c +++ b/examples/h5_crtgrpd.c @@ -19,7 +19,7 @@ #define FILE "groups.h5" int -main() +main(void) { hid_t file_id, group_id, dataset_id, dataspace_id; /* identifiers */ diff --git a/examples/h5_extlink.c b/examples/h5_extlink.c index 8d3fc8c..e1f02cf 100644 --- a/examples/h5_extlink.c +++ b/examples/h5_extlink.c @@ -411,7 +411,7 @@ UD_hard_create(const char *link_name, hid_t loc_group, const void *udata, size_t goto done; } - token = *((H5O_token_t *)udata); + token = *((const H5O_token_t *)udata); //! [H5Oopen_by_token_snip] @@ -459,7 +459,7 @@ UD_hard_delete(const char *link_name, hid_t loc_group, const void *udata, size_t goto done; } - token = *((H5O_token_t *)udata); + token = *((const H5O_token_t *)udata); /* Open the object this link points to */ target_obj = H5Oopen_by_token(loc_group, token); @@ -498,7 +498,7 @@ UD_hard_traverse(const char *link_name, hid_t cur_group, const void *udata, size if (udata_size != sizeof(H5O_token_t)) return H5I_INVALID_HID; - token = *((H5O_token_t *)udata); + token = *((const H5O_token_t *)udata); /* Open the object by token. If H5Oopen_by_token fails, ret_value will * be negative to indicate that the traversal function failed. diff --git a/examples/h5_rdwt.c b/examples/h5_rdwt.c index 679dc46..9947f59 100644 --- a/examples/h5_rdwt.c +++ b/examples/h5_rdwt.c @@ -19,7 +19,7 @@ #define FILE "dset.h5" int -main() +main(void) { hid_t file_id, dataset_id; /* identifiers */ diff --git a/examples/testh5cc.sh.in b/examples/testh5cc.sh.in index 88fc684..d42e7f1 100644 --- a/examples/testh5cc.sh.in +++ b/examples/testh5cc.sh.in @@ -11,14 +11,6 @@ # help@hdfgroup.org. # # Tests for the h5cc compiler tool -# Created: Albert Cheng, 2007/4/11 -# -# Modification: -# Albert Cheng, 2008/9/27 -# Added -shlib tests and verbose control. -# Albert Cheng, 2009/10/28 -# Added version compatibility tests. -# srcdir=@srcdir@ |