generating eclipse project with subprojects links the main project in the subprojects too


I use cmake to generate an eclipse project like this:


The project has some dependencies which are configured in cmake with “FetchContent_Declare”.

In the eclipse project, the source code directory of the project will also be added to the subprojects (as a link with the main project’s name). This is leading to severe problems in eclipse. When I delete that link eclipse is working properly. Sadly the link gets recreated under some unclear conditions.

I haven’t figured out yet, which changes in the cmake project are causing the link to be recreated. It seems that adding files to a subdirectory is safe. When I delete cmake’s cache the link will be recreated. That’s all I know so far.

What could have caused this issue? How can I possibly prevent it?

I’ve already posted a request in eclipse forum.