Search code examples
c++eclipseclearcase

How to create a project and add existing projects in Eclipse?


I am using C/C++ perspective in Eclipse.
The Eclipse is integrated with ClearCase VOB and inside the VOB, each specific module has been created as a project.

So in effect, those modules have to be imported as a project into Eclipse (at least, that is what I am aware of and have done).
Consequently, on my project explorer, I have a large number of projects, each representing a sub module.

The problem with this arrangement is that in order to rebuild the C/C++ index for all the projects, I have to manually rebuild the index for each individual project, which is time-consuming.
Ideally, I would like to have all the projects listed as part of a single project inside the project explorer, so that in order to rebuild the index for all the included projects (which are actually modules as indicated before), I could simply rebuild the C/C++ index for the top level project, which includes all the other projects.

Is there a way to accomplish this?


Solution

  • First, make sure to use a snapshot ClearCase view, not a dynamic one, in order to speed up the compilation time.

    Second, try and create a single project in a separate workspace, as described here, where you would:

    • reference your different module folder as sources
    • create a Makefile which would compile each project (since I don't believe Eclipse CDT supports C++ 20 modules yet): example here.