Setup for CMake and Clang adapted from cmake-boilerplate
install cmake, llvm and clang
$ cmake . && make
Is done via minunit
$ cmake . && make && make check
use make check
for verbose output make test
to get a simple fail or success.
Irony will not by default pickup the knr.h
header when looking at
knr_tests.c
to make this work cmake needs to output a compile_commands.json
in the root.
$ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
in the root of the project will do that, this likely does not need to be rebuild often.
Debug information is included by default via
set(CMAKE_BUILD_TYPE Debug)
in the ./CMakeLists.txt
. For more
on
CMake and debug
For using LLDB see this gist and LLDB Tutorial.