[CMake] Compiling with debug info on OSX

Alexander Broekhuis a.broekhuis at gmail.com
Mon Sep 23 02:39:52 EDT 2013


Thanks,

That works, apparently it was already working, but somehow I don't see the
debug info when I use the Apache APR with debug logging enabled.

I guess I have to take a look into APR to see what is going on.


Thanks for the replies!


2013/9/19 Cristian Bidea <cristi at king.com>

> If you're using clang or gcc setting the -g compile flag should do the
> trick.
>
> set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
> set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
>
> If you're setting the CMAKE_BUILD_TYPE then you should use the
> corresponding configuration flags:
>
> CMAKE_CXX_FLAGS_DEBUG
> CMAKE_C_FLAGS_DEBUG
> CMAKE_CXX_FLAGS_RELEASE
> CMAKE_C_FLAGS_RELEASE
>
> -Cristi
>
>
> On Wed Sep 18 19:16:26 2013, Alexander Broekhuis wrote:
>
>> I am using the Makefile generator and not XCode.
>>
>>
>> 2013/9/18 Michael Jackson <mike.jackson at bluequartz.net
>> <mailto:mike.jackson@**bluequartz.net <mike.jackson at bluequartz.net>>>
>>
>>
>>     Are you using Makefiles or the XCode generator or something else?
>>     ______________________________**_____________________________
>>     Mike Jackson                    Principal Software Engineer
>>     BlueQuartz Software                            Dayton, Ohio
>>     mike.jackson at bluequartz.net <mailto:mike.jackson@**bluequartz.net<mike.jackson at bluequartz.net>
>> >
>>     www.bluequartz.net <http://www.bluequartz.net>
>>
>>
>>     On Sep 18, 2013, at 9:37 AM, Alexander Broekhuis
>>     <a.broekhuis at gmail.com <mailto:a.broekhuis at gmail.com>**> wrote:
>>
>>     > Hi all,
>>     >
>>     > Basically a simple question: How do I compile a library with
>>     debug info on OSX?
>>     >
>>     > I've tried to obvious and set the CMAKE_BUILD_TYPE to Debug. But
>>     I am either doing something wrong, or this isn't enough..
>>     >
>>     > To check if there is debug info I use dwarfdump, and the output
>>     always says: .debug_info contents: < EMPTY >
>>     >
>>     > What am I doing wrong?
>>     >
>>     > --
>>     > Met vriendelijke groet,
>>     >
>>     > Alexander Broekhuis
>>     > --
>>     >
>>     > Powered by www.kitware.com <http://www.kitware.com>
>>
>>     >
>>     > Please keep messages on-topic and check the CMake FAQ at:
>>     http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>>     >
>>     > Kitware offers various services to support the CMake community.
>>     For more information on each offering, please visit:
>>     >
>>     > CMake Support: http://cmake.org/cmake/help/**support.html<http://cmake.org/cmake/help/support.html>
>>     > CMake Consulting: http://cmake.org/cmake/help/**consulting.html<http://cmake.org/cmake/help/consulting.html>
>>     > CMake Training Courses: http://cmake.org/cmake/help/**training.html<http://cmake.org/cmake/help/training.html>
>>     >
>>     > Visit other Kitware open-source projects at
>>     http://www.kitware.com/**opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>>     >
>>     > Follow this link to subscribe/unsubscribe:
>>     > http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>>
>>     --
>>
>>     Powered by www.kitware.com <http://www.kitware.com>
>>
>>
>>     Please keep messages on-topic and check the CMake FAQ at:
>>     http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>>
>>     Kitware offers various services to support the CMake community.
>>     For more information on each offering, please visit:
>>
>>     CMake Support: http://cmake.org/cmake/help/**support.html<http://cmake.org/cmake/help/support.html>
>>     CMake Consulting: http://cmake.org/cmake/help/**consulting.html<http://cmake.org/cmake/help/consulting.html>
>>     CMake Training Courses: http://cmake.org/cmake/help/**training.html<http://cmake.org/cmake/help/training.html>
>>
>>     Visit other Kitware open-source projects at
>>     http://www.kitware.com/**opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>>
>>     Follow this link to subscribe/unsubscribe:
>>     http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>>
>>
>>
>>
>> --
>> Met vriendelijke groet,
>>
>> Alexander Broekhuis
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/**support.html<http://cmake.org/cmake/help/support.html>
>> CMake Consulting: http://cmake.org/cmake/help/**consulting.html<http://cmake.org/cmake/help/consulting.html>
>> CMake Training Courses: http://cmake.org/cmake/help/**training.html<http://cmake.org/cmake/help/training.html>
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/**
>> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>>
>
>
>


-- 
Met vriendelijke groet,

Alexander Broekhuis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130923/f2487ad0/attachment.htm>


More information about the CMake mailing list