C++重构预编译头
不幸的是,在工作中的一个项目中,有人想到了一个好主意,将相当大的项目中的每个文件的每个标头放入预编译标头中。这意味着对项目中任何标头的任何更改都必须重新编译整个项目,并且所有 cpp 文件花费的时间太长。
是否有任何像样的 C++ 重构工具可以自动将所需的包含内容放入适当的 cpp 文件中?我真的不想对数百个不同的文件手动执行此操作。
Unfortunately on a project here at work, someone had the great idea to put every header every single file from pretty big project into the precompiled header. This means any change to any header in the project has to recompile the entire project, and all cpp files taking way too long.
Is there any decent C++ refactoring tool which could automatically put the needed includes in the appropriate cpp files? I really don't want to do this manually with hundreds of different files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很少有像样的 C++ 重构工具,因为解析 C++ 代码很困难(因此也很慢)。您可能需要自己编写这样一个工具,可能需要 GCC-XML。
There are very few decent C++ refactoring tools because parsing C++ code is hard (and therefore also slow). You'll probably have to write such a tool yourself, possibly with some assistance from GCC-XML.