diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-09-27 00:51:25 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-09-27 00:51:25 +0300 |
commit | 7286c9fc5b55df0499c7a8f28b5e61ec57e788cc (patch) | |
tree | 9aa8cd4c6ddd4e27d84dc94c6b91bdb0e380062d /CMakeLists.txt | |
parent | a087fe8c11f6139e0e0d48f055f8184e906befce (diff) | |
download | ck-7286c9fc5b55df0499c7a8f28b5e61ec57e788cc.tar.gz ck-7286c9fc5b55df0499c7a8f28b5e61ec57e788cc.tar.bz2 ck-7286c9fc5b55df0499c7a8f28b5e61ec57e788cc.zip |
Add licence and version info
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ffd50c9..ff55a80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,16 +10,26 @@ ## -------------------------------------------------------------------------- */ cmake_minimum_required (VERSION 3.5.6) project(ck C) +# version +set(ck_MAJOR_VERSION 0) +set(ck_MINOR_VERSION 4) +# compiler set(CMAKE_C_COMPILER clang) -option(CK_ASAN "Build with asan") # compiler flags -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") + +# options +option(CK_ASAN "Build with asan") +option(CK_RELEASE "Release build") if(CK_ASAN) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") -endif(CK_ASAN) +endif() + +if (NOT CK_RELEASE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") +endif() # Set project directories set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) @@ -27,6 +37,12 @@ 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) +# configure the info header +configure_file( + "${SRC_DIR}/ckinfo.h.in" + "${SRC_DIR}/ckinfo.h" + ) + # Set source code locations set(ckBin_src ${SRC_DIR}/ck.c) set(ckUnitTest_src ${UNIT_TEST_DIR}/ck-test.c) @@ -39,7 +55,7 @@ set(ckLib_src ${SRC_DIR}/dbhelper.c ${SRC_DIR}/ckutil.c ${SRC_DIR}/cklist.c -) + ) set(ckLib_hdr ${SRC_DIR}/actionparser.h @@ -50,7 +66,8 @@ set(ckLib_hdr ${SRC_DIR}/dbhelper.h ${SRC_DIR}/ckutil.h ${SRC_DIR}/cklist.h -) + ${SRC_DIR}/ckinfo.h + ) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RES_DIR}/cmake) |