ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Cmake debug option

asked 2014-04-21 05:23:35 -0500

Maya gravatar image

Hellow,

I may have just search really bad but I didn't find this information. I'm used to Makefile but how do I use the otion "-g" and "-Wall" in Cmake with catkin ? I try writing a really dumb program with a memory leak and to run it with valgrind but I have the following

==20197== 4 bytes in 1 blocks are definitely lost in loss record 1 of 1
==20197==    at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20197==    by 0x400845: main (in /home/ros/groovy_ws/catkin_ws/devel/lib/stalker/debug)

And so no line numbers...

Thanks a lot !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
8

answered 2014-04-21 06:02:50 -0500

joq gravatar image

updated 2014-04-21 06:03:54 -0500

This will set -g for you:

catkin_make -DCMAKE_BUILD_TYPE=Debug

I think -Wall is set automatically.

Here are come useful CMake variables: http://www.cmake.org/Wiki/CMake_Usefu...

edit flag offensive delete link more

Comments

Thanks a lot ! I've been searching exactly for that !

Maya gravatar image Maya  ( 2014-04-21 06:23:23 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2014-04-21 05:23:35 -0500

Seen: 2,326 times

Last updated: Apr 21 '14