summaryrefslogtreecommitdiffstats
path: root/CTestConfig.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-12 14:06:39 (GMT)
committerBrad King <brad.king@kitware.com>2022-04-12 14:06:39 (GMT)
commitefe08e289466683b0945a5396f6848064dec5ae0 (patch)
tree5fc18e88938ccb3b7a3916fdd126d817eff853e6 /CTestConfig.cmake
parent56a11b2f640d6ae1cc5189f9b41fa7a36a0ac318 (diff)
downloadCMake-3.23.1.zip
CMake-3.23.1.tar.gz
CMake-3.23.1.tar.bz2
CMake 3.23.1v3.23.1
Diffstat (limited to 'CTestConfig.cmake')
0 files changed, 0 insertions, 0 deletions
ption value='inactive/trunk_merge_coverity'>inactive/trunk_merge_coverity Mirror from: https://github.com/HDFGroup/hdf5.git
summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-01-11 20:02:34 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-01-11 20:02:34 (GMT)
commit244faaa0d048e7e06fb5aec8d4f661f1893c3030 (patch)
tree50d18b730a41e3f644f4d2729ea30ebe387bdfba /c++
parente1bcae8a6a804490aa941a654e99b1dd18251411 (diff)
downloadhdf5-244faaa0d048e7e06fb5aec8d4f661f1893c3030.zip
hdf5-244faaa0d048e7e06fb5aec8d4f661f1893c3030.tar.gz
hdf5-244faaa0d048e7e06fb5aec8d4f661f1893c3030.tar.bz2
HDFFV-10094: upgrade cmake command conventions
Also converted tests to use macros
Diffstat (limited to 'c++')
-rw-r--r--c++/examples/CMakeTests.cmake30
-rw-r--r--c++/test/CMakeTests.cmake15
2 files changed, 42 insertions, 3 deletions
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index 629f45d..8b5c6b9 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -21,7 +21,20 @@
set (last_test "CPP_ex-clear-objects")
foreach (example ${examples})
- add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ else ()
+ add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=cpp_ex_${example}.txt"
+ #-D "TEST_REFERENCE=cpp_ex_${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
@@ -48,7 +61,20 @@
set (last_test "CPP_ex_tutr-clear-objects")
foreach (example ${tutr_examples})
- add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ else ()
+ add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=cpp_ex_${example}.txt"
+ #-D "TEST_REFERENCE=cpp_ex_${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake