diff options
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 |