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

Hi,

I use cmake to generate an eclipse project like this:

cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_VERSION=4.18 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j4 PATH_TO_REPOSITORY "${@:1}"

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.