为什么 CDT 在 Ant 上重建我的 C 项目并在不相关的项目中构建?

发布于 2024-10-08 21:23:02 字数 153 浏览 0 评论 0原文

我有一个 Eclipse 工作区,其中 CDT 项目与其他不相关的项目共存。然而,当我在其中一个项目中运行“build as Ant build”时,CDT 也坚持重建其项目。

任何人都知道如何断开这种“隐藏”依赖关系? (不,它不在“链接资源”或“项目参考”中......)

I have an Eclipse workspace where a CDT project lives together with other unrelated projects. However, when I run "build as Ant build" in one of those projects, CDT insists on rebuilding its projects too.

Anyone have any ideas where to look to disconnect this "hidden" dependency? (And no, it's not in the "Linked Resources" or the "Project References"...)

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

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

发布评论

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

评论(3

梦纸 2024-10-15 21:23:02

工作区范围的构建实际上是由于我未能在“外部工具配置”中找到构建的选项造成的。您可以在此处指定构建整个工作区、包含的项目或某些特定资源。

还有一个 Eclipse bug,用于将默认值设置为不同于构建整个工作空间。 (人们可能会认为“Run as Ant build”默认不会构建任何东西,除了运行指定的 Ant 目标。)

The workspace wide build was actually caused by me failing to find the option for the build in "External Tools Configurations". There you can specify to build the whole workspace, the containing project, or some specific resource.

There is also an Eclipse bug for setting the default to something different than to build the whole workspace. (One could think that "Run as Ant build" would default to not build anything except running the specified Ant target.)

时光瘦了 2024-10-15 21:23:02

项目构建器是根据某些构建触发器的请求运行的。这可能是资源更改(当您自动启用构建时),也可能是您正在使用的构建操作:“构建为 Ant 构建”。构建操作可能会无意中请求构建整个工作区。

将以下内容放入文本文件中:

# Eclipse build
org.eclipse.core.resources/debug=true
org.eclipse.core.resources/build/interrupt=true
org.eclipse.core.resources/build/invoking=true
org.eclipse.core.resources/build/needbuild=true
#Managedbuild
org.eclipse.cdt.managedbuilder.core/debug/builder=true
org.eclipse.cdt.managedbuilder.core/debug=true
org.eclipse.cdt.managedbuilder.core/debug/pathEntryInit=false
org.eclipse.cdt.managedbuilder.core/debug/pathEntry=false

并使用附加开关运行 Eclipse:

-debug <trace_options>.file

这会将跟踪打印回显到启动 Eclipse 的 shell。您可以使用它来更好地定位您无疑会提交的错误报告:)

Project builders are run at the request of some build trigger. This might be resource changes (when you have build automatically enabled) or it could be the build action you're using: "build as Ant build". The build action may be inadvertently requesting a build of the whole workspace.

Put the following in a text file:

# Eclipse build
org.eclipse.core.resources/debug=true
org.eclipse.core.resources/build/interrupt=true
org.eclipse.core.resources/build/invoking=true
org.eclipse.core.resources/build/needbuild=true
#Managedbuild
org.eclipse.cdt.managedbuilder.core/debug/builder=true
org.eclipse.cdt.managedbuilder.core/debug=true
org.eclipse.cdt.managedbuilder.core/debug/pathEntryInit=false
org.eclipse.cdt.managedbuilder.core/debug/pathEntry=false

And run Eclipse with the additional switches:

-debug <trace_options>.file

This will echo trace prints to the shell in which you started Eclipse. You can use this to better target the bug report you'll no doubt file :)

や三分注定 2024-10-15 21:23:02

尝试取消选中项目菜单下的自动构建复选框。

Try to uncheck the Build Automatically checkbox, under Project menu.

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