从 CMakeLists.txt 生成包含目录和项目文件的列表
我想使用 emacs 来处理使用 CMake 构建的项目,虽然这通常工作得很好,但我想实现更好的项目管理命令。有没有一种简单的方法来生成某种文件作为项目文件的列表。
看来最好的方法可能只是一些对文件进行自定义写入的 CMake 宏,是否有更好的解决方案?
I'd like to use emacs to work on my project that is built using CMake, while this generally works fine, I'd like to implement better project management commands. Is there a simple way to generate some sort of file that acts as a listing of the project files.
It seems that the best way may just be some set of CMake macros that do a custom write to a file, is there perhaps any better solutions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我对 CMake 没有直接的经验。但有几种方法可以解决这个问题。
规范的方法是生成一个 TAGS 表作为构建过程的一部分。您将在轻松访问文件列表的基础上获得符号完成/导航。而且 ctags 速度超快。具体如何操作,我将让您自行谷歌,提示:wiki。
或者,您可以获得 Emacs 项目管理包,例如 EDE、eproject、mk-project,它们定义了项目的概念。请参阅 wiki。
I have no direct experience with CMake. But there are a couple of approaches to solving this.
The canonical way is to generate a TAGS table as a part of your buid process. You will get symbol completion/navigation on top of easy access to file-list. And ctags is hyper fast. I'll leave you to google how to do that specifically, hint: wiki.
Alternatively, you can get a Emacs project management package like EDE, eproject, mk-project that defines the concept of a project. See wiki.
您可以查看 CEDET 邮件列表 - 不久前就讨论过 CMake 支持,并且至少有一个人正在积极讨论致力于 EDE(CEDET 的项目管理)中的 CMake 支持
You can look onto CEDET mailing list - CMake support was discussed not so long time ago, and at least one person is actively working on CMake support in EDE (CEDET's project management)