diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2025-06-30 07:03:19 -0400 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2025-06-30 07:03:19 -0400 |
| commit | 7daa65f81e6c4454b4c42cf6f0c341e4e7bfbf38 (patch) | |
| tree | e0c38712409ceab03c53f94568ca4f04746e4d7b /tests | |
| parent | Add testing to gitignore (diff) | |
| download | cli-7daa65f81e6c4454b4c42cf6f0c341e4e7bfbf38.zip | |
update cmakelists for tests
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a307bd3..c8d20b8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,6 +3,14 @@ add_executable(test_word test_word.c ../src/word.c) add_test(NAME test_linebuffer COMMAND test_linebuffer) add_test(NAME test_word COMMAND test_word) +set(TEST_LINEBUFFER_SOURCES test_linebuffer.c ../src/linebuffer.c) +set(TEST_WORD_SOURCES test_word.c ../src/word.c) + +if(NOT HAVE_STRLCAT) + list(APPEND TEST_LINEBUFFER_SOURCES ../src/strlcat.c) + list(APPEND TEST_WORD_SOURCES ../src/strlcat.c) +endif() + find_package(PkgConfig REQUIRED) pkg_check_modules(CMOCKA REQUIRED cmocka) include_directories(${CMOCKA_INCLUDE_DIRS}) |