diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-26 20:47:05 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-26 20:47:05 -0600 |
commit | 61b14883c1ddbd5985c681ef7b559cf3c8c15525 (patch) | |
tree | b27a8c7d948c121f81486178ad77df577b83ab0d /CMakeLists.txt | |
parent | f7eb78bd9f38294814c05bcf7867ce6c4414c77c (diff) |
cmake: Fuss with include_directories for tests
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 1 |
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}" |