How to build debug in CMake

If you want to build an executable / library with debug symbols in CMake, run

cmake-build-debug.sh
cmake -DCMAKE_BUILD_TYPE=Debug .
make

Conversely, if you want to build an executable / library in release mode, run

cmake-build-release.sh
cmake -DCMAKE_BUILD_TYPE=Release .
make

 


Check out similar posts by category: C/C++, CMake