"Eclipse CDT4 - Unix Makefiles" does not include subprojects source dir in the Eclipse projects
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Assuming there is a project called "app1" that adds another sibling project "lib1" on its CMakeLists.txt. When calling cmake -G "Eclipse CDT4 - Unix Makefiles" to generate Eclipse projects, not only app1 project is created as the main project, but both projects are added as virtual [Subprojects], as expected.
That is great, however, only the source code of app1 is indexed by Eclipse. In order to indexing work for lib1 too, we need to manually right click the project and go to the "C/C++ Project paths" and add "[Subprojects]"
or "[Subprojects]/lib1"
in the Source list. That action would result in a tag being added to the .cproject:
<pathentry kind="src" path="[Subprojects]/lib1"/>
is added to
<storageModule moduleId="org.eclipse.cdt.core.pathentry">
It would be great if cmake added CMAKE_SOURCE_DIR of all subprojects to the parent project's .cproject during eclipse project generation
See also #12579 .