Completely exclude certain directories from Eclipse CDT project

user674669 picture user674669 · Sep 21, 2011 · Viewed 20.8k times · Source

I am working a C++ codebase that is built & run outside Eclipse.

I made an Eclipse project out of it where I just use Eclipse for browsing/editing the code.

However, I can't figure out how to completely exclude certain directories like build/ from it completely. They should be excluded not only during building but also during "Refresh workspace" which seems to get triggered so often. To give an example, my workspace is

d:\workspace

It has directories like

source/
build/
..

During startup, Eclipse picks up all directories inside the workspace automatically. However, I would like Eclipse to exclude build/ completely.

My code is on a remote machine, so "Refresh workspace" slows things down.

Answer

ks1322 picture ks1322 · Sep 21, 2011

You can do it by adding Resource filters. Add Exclude All resource filter type to root folder of your project. See also this answer.