dilevin / computer-graphics-raster-images

Computer Graphics Assignment about Raster Images
1 stars 7 forks source link

Setting up GDB, where would I put a -g flag for building? #38

Open wangwalton opened 4 years ago

songfeil commented 4 years ago

Stackoverflow tells me this https://stackoverflow.com/questions/10005982/how-do-you-set-gdb-debug-flag-with-cmake

dilevin commented 4 years ago

cmake accepts a BUILD_TYPE flag which determines whether the code is built in debug or release mode. If you want to make sure the code is compiled in debug mode run cmake from your build directory like this:

cmake .. -DCMAKE_BUILD_TYPE=Debug

for release mode:

cmake .. -DCMAKE_BUILD_TYPE=Release

edit: ninja'd

wangwalton commented 4 years ago

thanks for fast response! worked great.