diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-08-07 04:59:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-07 04:59:31 (GMT) |
commit | 956282fa6f5f5b7df92be6f14c12681f7ecabbc9 (patch) | |
tree | 262418febb0a037f752e577ab632accd358edd93 /hl/c++ | |
parent | 7127d8912c8fa601d59b4e8ce522eaf149c02344 (diff) | |
download | hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.zip hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.gz hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.bz2 |
Develop cmake clean (#1971)
Diffstat (limited to 'hl/c++')
-rw-r--r-- | hl/c++/examples/CMakeTests.cmake | 19 | ||||
-rw-r--r-- | hl/c++/test/CMakeTests.cmake | 20 |
2 files changed, 34 insertions, 5 deletions
diff --git a/hl/c++/examples/CMakeTests.cmake b/hl/c++/examples/CMakeTests.cmake index 82b32cf..f72b2a0 100644 --- a/hl/c++/examples/CMakeTests.cmake +++ b/hl/c++/examples/CMakeTests.cmake @@ -16,12 +16,16 @@ ############################################################################## ############################################################################## # Remove any output file left over from previous test run +set (HL_CPP_EX_PT_CLEANFILES + PTcppexampleFL.h5 +) add_test ( NAME HL_CPP_ex_ptExampleFL-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove - PTcppexampleFL.h5 - ptExampleFL.txt + -E remove ${HL_CPP_EX_PT_CLEANFILES} +) +set_tests_properties (HL_CPP_ex_ptExampleFL-clear-objects PROPERTIES + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} ) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -40,3 +44,12 @@ else () ) endif () set_tests_properties (HL_CPP_ex_ptExampleFL PROPERTIES DEPENDS HL_CPP_ex_ptExampleFL-clear-objects) +add_test ( + NAME HL_CPP_ex_ptExampleFL-clean-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${HL_CPP_EX_PT_CLEANFILES} +) +set_tests_properties (HL_CPP_ex_ptExampleFL-clean-objects PROPERTIES + DEPENDS HL_CPP_ex_ptExampleFL + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) diff --git a/hl/c++/test/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake index 28ee5df..fa2a3f2 100644 --- a/hl/c++/test/CMakeTests.cmake +++ b/hl/c++/test/CMakeTests.cmake @@ -15,12 +15,19 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - +# Remove any output file left over from previous test run +set (HL_CPP_PT_CLEANFILES + packettest.h5 +) add_test ( NAME HL_CPP_ptableTest-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove ${example}.txt + -E remove ${HL_CPP_PT_CLEANFILES} ) +set_tests_properties (HL_CPP_ptableTest-clear-objects PROPERTIES + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) + if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME HL_CPP_ptableTest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_ptableTest>) else () @@ -37,3 +44,12 @@ else () ) endif () set_tests_properties (HL_CPP_ptableTest PROPERTIES DEPENDS HL_CPP_ptableTest-clear-objects) +add_test ( + NAME HL_CPP_ptableTest-clean-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${HL_CPP_PT_CLEANFILES} +) +set_tests_properties (HL_CPP_ptableTest-clean-objects PROPERTIES + DEPENDS HL_CPP_ptableTest + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} +) |