开发者

How to build current project only in Eclipse CDT on "Build project"?

I am working with Eclipse CDT and I want to build the current开发者_StackOverflow project only, not any referenced project. Is this somehow possible?

The idea behind this is, that I want to distinguish between "Build Project" and "Build all projects" (in which case, referenced libraries should be built as well).

Thanks in advance, Martin


I use another workaround; I changed the default key binding for "Build All" to Alt+Ctrl+B, and changed the binding to "Build Project" to "Ctrl+B".

If you didn't want to mess with the defaults you could add the custom binding (e.g., Alt+Ctrl+B directly to "Build Project".

To change keyboard shortcuts go to &Window, &Preferences, and search for "keys".


I'd love to have a better answer for this - the only workaround I know of is to go and actually close all the projects but the one you want built.


Shortcut Key Method

Another way is to change the shortcut key for building a project eg. Ctrl-B to only Build Project, instead of Build All.

  1. Go to Window -> Preferences
  2. In General -> Keys, find "Build" in the filter
  3. There are two cases, Build All and Build Project.
  4. Personally, I set Ctrl-B to Build Project by pressing Ctrl-B in the Binding Box
  5. Next I set Ctrl-A Ctrl-B sequence to build all Projects

Try it out


You can right click on the project explorer and choose "Build Project", or just use the:

"Project" menu -> "Build Project"


I found that 'Build Project' is grayed (disabled) in the Project menu (and not in the Project Explorer context menu) when the Project -> 'Build Automatically' option is checked. I unchecked that and can now independently build my projects.


I un-reference the projects. Somehow the newest CDT is still able to find things in the code.

Build only the project dindn't work as it would still build all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜