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

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

问题描述

是否有可能调试 CMakeLists.txt 文件(至少列出变量),除了 message 声明?

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

推荐答案

CMake 没有交互式调试器,但是也有标志 -Wdev, --debug-output--trace 这可能会有所帮助.还要记得检查日志文件 CMakeFilesCMakeOutput.logCMakeFilesCMakeError.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 CMakeFilesCMakeOutput.log and CMakeFilesCMakeError.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天全站免登陆