[CMake] How to force CMake to generate a makefile that compiles with debugging information (-g)

Pau Garcia i Quiles pgquiles at elpauer.org
Sun Apr 20 18:11:57 EDT 2008


Quoting Dario Figueira <wurmdario at gmail.com>:

> The title pretty much sums it;
> I can't seem to get a straight anwser from the CMake manual.. :S
> And the "make" generated does not have an option to compile with debugging
> informations :|
>
> Any hints? Am i missing something terribly obvious?
>
> Thank you in advance,

Use the CMAKE_BUILD_TYPE variable:

cmake -DCMAKE_BUILD_TYPE:STRING=Debug /your/source/dir

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)



More information about the CMake mailing list