Previous Dammit, I have a bug in my program |
Parent Dammit, I have a bug in my program |
Outline | Next How to use the valgrind's debugger |
So, we have to change the CMakeLists.txt file to enable these debugging symbols.
This is done with the function add_definitions. You can do :
1 |
add_definitions(-O3 -g)
|
1 |
add_definitions(-Og)
|
So, your CMakeLists.txt file will looks like :
1 2 3 4 5 6 |
project(HadamardProduct) cmake_minimum_required(VERSION 3.0) add_definitions(-O3 -g) add_executable(hadamard_product main.cpp) |
1 2 3 4 5 |
make Scanning dependencies of target hadamard_product [ 50%] Building CXX object CMakeFiles/hadamard_product.dir/main.cpp.o [100%] Linking CXX executable hadamard_product [100%] Built target hadamard_product |
Previous Dammit, I have a bug in my program |
Parent Dammit, I have a bug in my program |
Outline | Next How to use the valgrind's debugger |