diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-09-27 12:36:54 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-09-27 12:36:54 +0300 |
commit | 03917439a1ddcf202e9fc53937b10eeb7ec0a99a (patch) | |
tree | d45b75be65d08be774058d67fda94bc7665bdce9 /README.org | |
parent | 7286c9fc5b55df0499c7a8f28b5e61ec57e788cc (diff) | |
download | ck-03917439a1ddcf202e9fc53937b10eeb7ec0a99a.tar.gz ck-03917439a1ddcf202e9fc53937b10eeb7ec0a99a.tar.bz2 ck-03917439a1ddcf202e9fc53937b10eeb7ec0a99a.zip |
Update CMakeLists and build istructions
Diffstat (limited to 'README.org')
-rw-r--r-- | README.org | 62 |
1 files changed, 39 insertions, 23 deletions
@@ -10,38 +10,54 @@ - sqlite3-dev ** compiler -By default I use clang, if you want to use gcc just -edit the =CMakeLists.txt= file and change =clang= to =gcc= +#+BEGIN_SRC sh + > export CC=clang + # or + > export CC=gcc +#+END_SRC ** make #+BEGIN_SRC sh -# clone the repo -> cd ~/code; git clone https://gitlab.com/grm-grm/ck -# make a build directory and enter it -> mkdir ~/ck_build; cd ~/ck_build; -# run cmake -> cmake ~/code/ck -# run make -> make -# run ck -> ./ck + # clone the repo + > cd ~/code; git clone https://gitlab.com/grm-grm/ck + # make a build directory and enter it + > mkdir ~/ck_build; cd ~/ck_build; + # run cmake + > cmake ~/code/ck + # run make + > make + # run ck + > ./ck #+END_SRC * for devs -** make +** CMake options +cmake accepts the following options: +#+BEGIN_SRC cmake + option(CK_ASAN "Build with asan") + option(CK_DEBUG "Build with debug symbols") + option(CK_TESTS "Make the tests") + option(CK_SHARED "Build with shared lib") +#+END_SRC + +To use any one of them append it after the cmake command like so: +#+BEGIN_SRC sh + cmake -DCK_ASAN=1 -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck +#+END_SRC + Just build with address sanitizer enabled like so: llvm has better asan than gcc, so I use that. #+BEGIN_SRC sh -# clone the repo -> cd ~/code; git clone https://gitlab.com/grm-grm/ck -# make a build directory and enter it -> mkdir ~/ck_build; cd ~/ck_build; -# run cmake -> cmake ~/code/ck -DCK_ASAN=ON -# run make -> make -# run ck -> ./ck + # clone the repo + > cd ~/code; git clone https://gitlab.com/grm-grm/ck + # make a build directory and enter it + > mkdir ~/ck_build; cd ~/ck_build; + # run cmake + > cmake -DCK_ASAN=1 -DCK_DEBUG=1 -DCK_TESTS=1 ~/code/ck + # run make + > make + # run ck + > ./ck #+END_SRC ** tests |