summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-17 14:31:29 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-02-22 22:07:45 -0500
commitd02f4f7ad73d91504b9c9eb096989684edbc3417 (patch)
tree30dc04f8533c8cc1379bdeaae622e46e5920cf6c /cmake
parente6d93612e86f50809b941030ef605382895e6f0a (diff)
downloadlibgit2-d02f4f7ad73d91504b9c9eb096989684edbc3417.tar.gz
cmake: refactor `add_clar_test` into separate module
Diffstat (limited to 'cmake')
-rw-r--r--cmake/AddClarTest.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/AddClarTest.cmake b/cmake/AddClarTest.cmake
new file mode 100644
index 000000000..743941638
--- /dev/null
+++ b/cmake/AddClarTest.cmake
@@ -0,0 +1,7 @@
+function(ADD_CLAR_TEST project name)
+ if(NOT USE_LEAK_CHECKER STREQUAL "OFF")
+ add_test(${name} "${PROJECT_SOURCE_DIR}/script/${USE_LEAK_CHECKER}.sh" "${PROJECT_BINARY_DIR}/${project}" ${ARGN})
+ else()
+ add_test(${name} "${PROJECT_BINARY_DIR}/${project}" ${ARGN})
+ endif()
+endfunction(ADD_CLAR_TEST)