[Insight-users] Problem with KDevelop and Cmake

Kayhan Batmanghelich kayhan_batman at yahoo.com
Fri Aug 22 13:07:07 EDT 2008

Hello Everybody,

Has anybody tried to debug a CMake itk project
in kdevelop? Should I change something in CMakeList.txt in order to be
able to place a breakpoint? 
Here is what I did, I create a
kdevelop project by "-G KDevelop3 - Unix Makefiles" which makes both
Kdevelop and Makefile (cmake-ver2.6). Then I opened the project in
Kdevelop. It is built fine and even one can debug it in gdb by by
"break", "run", etc. But when I opened it in Kdevelop and tried to stop
the program on a breakpoint and step through, nothing happen. It seems
that program stops somewhere but it does not show where! I have used
kdevelop for debugging purpose before but not for a Cmake project, this
is why I think that I must be missing something very obvious for an
expert. I read somewhere [1] that I should compile my program with "-g3
-O0" but I don't where I should put that option in Cmake. I am assuming
that it has already had "-g" because I am able to debug using gdb. 

I would be thankful if you can help.

[1] http://www.kdevelop.org/mediawiki/index.php/FAQ#Debug_FAQs


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080822/e66e20df/attachment.htm>

More information about the Insight-users mailing list