如何调试CMakeLists.txt文件? [英] How do I debug CMakeLists.txt files?

查看:796
本文介绍了如何调试CMakeLists.txt文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以调试 CMakeLists.txt 文件(至少列出变量),但消息语句?

Is there a possibility to debug CMakeLists.txt files (at least listing of variables) except for the message statement?

推荐答案

没有用于CMake的交互式调试器,但是还有标志 -Wdev -debug-output -trace 可能会有所帮助。还记得检查一下主要收集输出的日志文件 CMakeFiles\CMakeOutput.log CMakeFiles\CMakeError.log CMake调用的进程的数量(例如,在检查类型或标头的存在时)。

There is no interactive debugger for CMake, however there are also the flags -Wdev, --debug-output and --trace which might help. Also remember to check the log files CMakeFiles\CMakeOutput.log and CMakeFiles\CMakeError.log which mainly collect outputs of processes called by CMake (for example while checking for presence of a type or header).

自3.7版以来,CMake现在正式支持服务器模式,因此集成IDE可能会在不久的将来有所改善。初始支持同时存在于 Qt中创建者 Visual Studio 2017 RC

Since version 3.7, CMake now officially supports a "server mode" so integration in IDEs is likely to improve in the near future. Initial support exists both in Qt Creator and Visual Studio 2017 RC

这篇关于如何调试CMakeLists.txt文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆