-
Notifications
You must be signed in to change notification settings - Fork 14
How to build pandora for debugging, profiling and release
leoisl edited this page May 17, 2019
·
1 revision
- Go to a build folder
- Build the project accordingly to what you want to do:
- For debugging:
cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j 4
- Flags passed to compiler:
-g
-
ctest -VV
will work here, so you can check if the code is indeed working; - If you do not use this to debug, variables will get optimized out and functions will get inlined, making it hard to debug;
- For profiling (e.g. callgrind):
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make -j 4
- Flags passed to compiler:
-O2 -g -DNDEBUG
-
ctest -VV
will NOT work here as asserts are turned off;
- For release (or if you want to test the most optimized executable):
cmake -DCMAKE_BUILD_TYPE=Release .. && make -j 4
- Flags passed to compiler:
-O3 -DNDEBUG
-
ctest -VV
will NOT work here as asserts are turned off;
- For debugging: