aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-04-15 01:57:16 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-04-15 01:57:16 +0300
commitac34419be8a56d86a395a6ef0ce86c89b25ddd55 (patch)
tree2024d4014a1d42957d029af407160a6ce3094417 /CMakeLists.txt
parentbc25e14b448edb9f41260a23cf6567e6632db267 (diff)
downloadck-ac34419be8a56d86a395a6ef0ce86c89b25ddd55.tar.gz
ck-ac34419be8a56d86a395a6ef0ce86c89b25ddd55.tar.bz2
ck-ac34419be8a56d86a395a6ef0ce86c89b25ddd55.zip
add testing
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 508dd3c..a0dca2c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,8 @@
cmake_minimum_required (VERSION 3.5.6)
project(ck C)
-
# Set project directories
-set(PROJECT_SOURCE_DIR ./src)
+set(PROJECT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
# Set source code locations
set(ckBin_src ${PROJECT_SOURCE_DIR}/ck.c)
set(ckLib_src
@@ -42,3 +41,10 @@ add_library (ckLib SHARED
add_executable(ck ${ckBin_src})
target_link_libraries (ck ckLib)
target_link_libraries (ck ${SQLITE3_LIBRARIES})
+
+# copy test file
+set(PROJECT_TEST_DIR ${PROJECT_SOURCE_DIR}/tests)
+set(BIN_TEST_DIR ${CMAKE_BINARY_DIR}/tests)
+set(PROJECT_TESTING_GROUNDS ${CMAKE_BINARY_DIR}/test_files)
+configure_file(${PROJECT_TEST_DIR}/init ${BIN_TEST_DIR}/init @ONLY)
+configure_file(test_ck test_ck @ONLY)