<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">Hi Bill,<br><br>Thank you very much for your reply.<br><br>I tried to change CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG from "-g" to "-g3 -O0" (as you said) but "-g" is imported from itk and CMake changes it back to "-g". CMake complains that :<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>--------------------------------------------------<br>Warning: CMake is forcing CMAKE_C_FLAGS_DEBUG to "-g" to match that imported from ITK.&nbsp; If this message appears for more than one imported project, you have<br>&nbsp;conflicting options and will have to re-build one of those projects.<br><br>&nbsp;Warning: CMake is forcing CMAKE_CXX_FLAGS_DEBUG to "-g" to match that imported from ITK.&nbsp; If this message appears for more than one imported project, you
 have<br>&nbsp;conflicting options and will have to re-build one of those projects.<br><br>&nbsp;CMake Warning (dev) in CMakeLists.txt:<br>&nbsp;&nbsp; No cmake_minimum_required command is present.&nbsp; A line of code such as<br><br>&nbsp;&nbsp;&nbsp;&nbsp; cmake_minimum_required(VERSION 2.6)<br><br>&nbsp;&nbsp; should be added at the top of the file.&nbsp; The version
 specified may be lower<br>&nbsp;&nbsp; if you wish to support older CMake versions for this project.&nbsp; For more<br>&nbsp;&nbsp; information run "cmake --help-policy CMP0000".<br>&nbsp;This warning is for project developers.&nbsp; Use -Wno-dev to suppress it.<br><br>---------------------------------<br><br>Do you think that I should re-compile ITK again with "-g3 -O0" options or there are some hack to get around it.<br><br>Thanks,<br>Kayhan<br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">----- Original Message ----<br>From: Bill Lorensen &lt;bill.lorensen@gmail.com&gt;<br>To: Kayhan Batmanghelich &lt;kayhan_batman@yahoo.com&gt;<br>Cc: insight-users@itk.org<br>Sent: Friday, August 22, 2008 2:44:18 PM<br>Subject: Re: [Insight-users] Problem with KDevelop and Cmake<br><br>
Kayhan,<br><br>In your CMakeCache.txt file, set<br>CMAKE_CXX_FLAGS_DEBUG:STRING=-g3 -O0<br>CMAKE_C_FLAGS_DEBUG:STRING=-g3 -O0<br>and<br>CMAKE_BUILD_TYPE:STRING=Debug<br><br>You can either edit the CMakeCache.txt file or use ccmake.<br><br>Bill<br><br>On Fri, Aug 22, 2008 at 1:07 PM, Kayhan Batmanghelich<br>&lt;<a rel="nofollow" ymailto="mailto:kayhan_batman@yahoo.com" target="_blank" href="mailto:kayhan_batman@yahoo.com">kayhan_batman@yahoo.com</a>&gt; wrote:<br>&gt; Hello Everybody,<br>&gt;<br>&gt; Has anybody tried to debug a CMake itk project in kdevelop? Should I change<br>&gt; something in CMakeList.txt in order to be able to place a breakpoint?<br>&gt; Here is what I did, I create a kdevelop project by "-G KDevelop3 - Unix<br>&gt; Makefiles" which makes both Kdevelop and Makefile (cmake-ver2.6). Then I<br>&gt; opened the project in Kdevelop. It is built fine and even one can debug it<br>&gt; in gdb by by "break", "run", etc. But when I opened it in
 Kdevelop and tried<br>&gt; to
 stop the program on a breakpoint and step through, nothing happen. It<br>&gt; seems that program stops somewhere but it does not show where! I have used<br>&gt; kdevelop for debugging purpose before but not for a Cmake project, this is<br>&gt; why I think that I must be missing something very obvious for an expert. I<br>&gt; read somewhere [1] that I should compile my program with "-g3 -O0" but I<br>&gt; don't where I should put that option in Cmake. I am assuming that it has<br>&gt; already had "-g" because I am able to debug using gdb.<br>&gt;<br>&gt; I would be thankful if you can help.<br>&gt;<br>&gt; [1] <a rel="nofollow" target="_blank" href="http://www.kdevelop.org/mediawiki/index.php/FAQ#Debug_FAQs">http://www.kdevelop.org/mediawiki/index.php/FAQ#Debug_FAQs</a><br>&gt;<br>&gt;<br>&gt; Regards,<br>&gt; Kayhan<br>&gt;<br>&gt; _______________________________________________<br>&gt; Insight-users mailing list<br>&gt; <a rel="nofollow"
 ymailto="mailto:Insight-users@itk.org" target="_blank" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>&gt; <a rel="nofollow" target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>&gt;<br>&gt;<br></div></div></div></div><br>



      </body></html>