How to build debug in CMake
If you want to build an executable / library with debug symbols in CMake, run
cmake -DCMAKE_BUILD_TYPE=Debug .
make
Conversely, if you want to build an executable / library in release mode, run
cmake -DCMAKE_BUILD_TYPE=Release .
make