summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-26 20:47:05 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-03-26 20:47:05 -0600
commit61b14883c1ddbd5985c681ef7b559cf3c8c15525 (patch)
treeb27a8c7d948c121f81486178ad77df577b83ab0d /CMakeLists.txt
parentf7eb78bd9f38294814c05bcf7867ce6c4414c77c (diff)
cmake: Fuss with include_directories for tests
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 386b13c..c7bf993 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -98,6 +98,7 @@ function(add_lib_test arg_libname arg_testname)
if (ENABLE_TESTS)
add_executable("${arg_testname}" "tests/${arg_testname}.c")
target_link_libraries("${arg_testname}" "${arg_libname}")
+ target_include_directories("${arg_testname}" PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests)
add_test(
NAME "${arg_libname}/${arg_testname}"
COMMAND valgrind --error-exitcode=2 "./${arg_testname}"