[CMake] How to debug a CMake script?

Robert Dailey rcdailey.lists at gmail.com
Tue Apr 17 12:56:34 EDT 2012


AFAIK, there is no interactive debugger for CMake scripts. You are doing
exactly what I do. I use the message() command frequently to output
variable values and test code flow. It's really the only way, unfortunately.

On Sun, Apr 15, 2012 at 11:04 AM, Christoph Grüninger <
christoph.grueninger at iws.uni-stuttgart.de> wrote:

> Hi CMake,
> how do you debug CMake scripts? I know -Wdev, --debug-output,
> and --trace but often they are not sufficient. If I am
> interested in the value of a variable or want to check why a
> test fails I have no clue what to do. Currently, I work with
> printf debugging, a technique from the middle age of computer
> programming.
> Does a special mode or program exist to help me with debugging?
> How do you do your debugging?
>
> Thanks in advance,
> Christoph
>
> --
> My new computer came with Windows 7.
> Windows 7 is much more user-friendly than Windows Vista.
> I don't like that.                     [Sheldon, S03E13]
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120417/5cdd566d/attachment.htm>


More information about the CMake mailing list