[CMake] How can I add -gstabs to the compile item for Debug?

Kermit Mei kermit.mei at gmail.com
Thu Dec 18 12:33:45 EST 2008


hello, I want debug my project which is managed by cmake.

I don't know how to add the debug information to the program.

For example, I always compile my program by the following way:


c++ -Wall -gstabs(or -g)  main.cpp hello.cpp -o main


Then I can use gdb to debug it.

How can I use cmake to do the same thing?

Thanks!
Kermit Mei



More information about the CMake mailing list