aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d1b628..008a402 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,11 +25,12 @@ endif(CK_ASAN)
set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
set(RES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/res)
set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
+set(UNIT_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/unit)
# Set source code locations
set(ckBin_src ${SRC_DIR}/ck.c)
+set(ckUnitTest_src ${UNIT_TEST_DIR}/ck-test.c)
set(ckLib_src
- ${SRC_DIR}/ck.c
${SRC_DIR}/actionparser.c
${SRC_DIR}/actions.c
${SRC_DIR}/actionhelper.c
@@ -69,8 +70,12 @@ add_library (ckLib SHARED
# Link
add_executable(ck ${ckBin_src})
-target_link_libraries (ck ckLib)
-target_link_libraries (ck ${SQLITE3_LIBRARIES})
+target_link_libraries(ck ckLib)
+target_link_libraries(ck ${SQLITE3_LIBRARIES})
+## unit test
+add_executable(ck-test ${ckUnitTest_src})
+target_link_libraries(ck-test ckLib)
+target_link_libraries(ck-test ${SQLITE3_LIBRARIES})
# copy test files
set(BIN_TESTS_DIR ${CMAKE_BINARY_DIR}/res/tests)