Eclipse CDT - 在项目中构建子目录

发布于 2024-08-20 21:07:16 字数 248 浏览 9 评论 0原文

我想知道 Eclipse (CDT) 中是否有一个选项可以仅构建项目的一部分。

我的情况是我有一个非常大的单个项目,其中包含许多子目录,而我的构建系统是一个自定义脚本。现在,如果我从项目的根文件夹运行自定义脚本,它将构建项目的所有子文件夹。这需要很长时间,我希望有一个选项来指示 CDT 执行自定义构建命令,具体取决于在源树中选择的文件夹。 (我的自定义构建脚本将仅构建该目录的内容)。

CDT 中是否有执行此类操作的选项? (我正在使用伽利略)。

i would like to know if there is an option in Eclipse (CDT) to build only part of project.

my situation is i got a very large single project which consist of many sub directories, and my build system is a custom script. now if i run the custom script from the root folder of the project, it will build all the sub folders of the projects. this takes long time and i would like to have an option to instruct the CDT to execute custom build command depending in which folder is selected in the source tree. (my custom build script would build then only the content of that directory).

is there any option to perform such action in CDT? (i'm using Galileo).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

來不及說愛妳 2024-08-27 21:07:16

您可以创建自定义 make 目标。有一个特定的视图“Make Target”,您可以在其中查看/添加/编辑它们。我们在项目中使用它们来构建项目的单个组件。
问题是您需要为每个子目录创建一个新目标。好处是您可以轻松地跨子目录复制每个目标。

记住一些快捷方式也可以节省时间:(在 Indigo 中)F9 重新启动最后一个目标,CTRL+SHIFT-Q、M 显示“创建目标”视图。 ;-)

另外,您应该升级到 Indigo - 前提是您的插件允许这样做。从那时起,cdt 插件得到了巨大的改进。

You can create a custom make target. There is a specific view "Make Target", where you can view/add/edit them. We use them in our project to build a single components of our project.
The catch is that you will need to create a new target for each subdirectory. The bonus is that you easily copy each target across subdirectories.

It is also a time saver to know some short-cuts by heart: (in Indigo) F9 to re-launch the last target, and CTRL+SHIFT-Q, M to display the Make Target view. ;-)

Also, you should upgrade to Indigo - provided your plugins permit this. The cdt plugin is massively improved since then.

月牙弯弯 2024-08-27 21:07:16

我不认为 CDT 提供这个。但是,请务必考虑您的项目是否真的最适合作为单个项目,或者是否可以从拆分为子项目中受益。您的 makefile 中也可能会带来性能提升;你读过“递归使人认为有害”的文章吗?

I don't think CDT provides this. However, do consider whether your project really is best suited to being a single project or if it might benefit from being split up into sub-projects. There might also be a performance boost to be found in your makefile; have you read the "Recursive Make Considered Harmful" essay?

淡墨 2024-08-27 21:07:16

我们的 CI 系统可以处理这个问题,因为 Eclipse 不能。

Our CI system handles this because Eclipse doesn't.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文