是否有可以重新格式化cmake文件的实用程序 [英] Is there any utility that can reformat a cmake file
问题描述
我的cmake文件比较复杂,我想知道是否有任何实用程序可以重新格式化cmakeList.txt并美化它以便于阅读?
I have relatively complex cmake files and I am wondering if there is any utility that can reformat a cmakeList.txt and beautify it for easier reading?
一些简单的技巧就可以完成工作,例如缩进是否endif节等等.
Some simple tricks would do the jobs, such as indenting if else endif sections and so on.
有没有这样的工具?
我正在使用notepad ++进行编辑,但是如果有其他工具,我可以切换.
I am using notepad++ for editing, but if there is any other tools, I can switch.
推荐答案
看看 Atom 及其插件语言cmake (您可以使用Atom软件包管理器轻松安装).
Take a look at Atom and its plugin language-cmake (you can install easily with Atom package manager).
两个都安装好后,打开CMakeLists.txt并转到Edit > Lines > Auto Indent
.
Once both are installed, open your CMakeLists.txt and go to Edit > Lines > Auto Indent
.
这篇关于是否有可以重新格式化cmake文件的实用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!