问题描述
是否可以调试 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).
以来,CMake现在正式支持服务器模式,因此集成IDE可能会在不久的将来有所改善。初始支持同时存在于和
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文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!