diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-09-16 15:27:31 +0300 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-09-16 15:27:31 +0300 |
commit | af17ead850f90cf6e4476aa74975e68d7293fb27 (patch) | |
tree | 8e2db1f5feae9b25cf5294ea635378f444d295c7 /CMakeLists.txt | |
parent | 0f33c8a9cbabda257c4dd73009266a4cf5f857a7 (diff) | |
download | ck-af17ead850f90cf6e4476aa74975e68d7293fb27.tar.gz ck-af17ead850f90cf6e4476aa74975e68d7293fb27.tar.bz2 ck-af17ead850f90cf6e4476aa74975e68d7293fb27.zip |
Add unit test infrastructure
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
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) |