On 10 July 2012 08:27, Greg 'groggy' Lehey <
groo...@gmail.com> wrote:
> On Tuesday, 10 July 2012 at 7:53:26 +0200, Luk?? Jirkovsk wrote:
>> On 10 July 2012 02:18, Terry Duell <
tdu...@iinet.net.au> wrote:
>>>
>>> Whoops...that's not right. If building in the topmost dir of a hugin
>>> repository, and running cmake at that level;
>>>
>>> " cmake . -DDebug=1"
>>
>> It should be "cmake -DCMAKE_BUILD_TYPE=Debug"
>
> Thanks, but that's not what I'm looking for. That enables debugging
> code in the source. I'm looking for something that tells the
> Makefiles to build the object files with debugging symbols (the -g
> option to gcc) so that I can investigate what's going on with gdb.
>
> Greg
This option passes the -g compiler option automatically, so you will
get debugging symbols. This is the standard way to create a debug
build using CMake. If you really do not want other debug information,
just set up CFLAGS & CXXFLAGS appropriately before running cmake. Oh,
and for both options to work you need to do a clean build (especially
there must not be a CMakeCache file before you run cmake).
Lukas