Is it possible to have a project structure independent on folder structure? I have quite complex physical project structure spanning different repositories. It looks like:
- RepoA (cross platform)
- RepoB (platform specific)
To build for specific platform, content of RepoA and RepoB must be merged together (that is why everything is named exactly same). Resulting folder with CMake scripts looks like:
Individual CMakeLists.txt contain paths to source and include files from RepoA and RepoB.
When I open similar structure in CLion, I first get only Platform directory with its structure. All source files are directly in the root. Include files are not in the project at all. First of all why are include files missing and why are those files not added into folder where related CMakeLists.txt is located?
I need to change the project root to the first common parent of RepoA and RepoB to get all source codes and include files into CLion. The first problem is that it also brings in tons of other directories which I don't want in the project - I didn't find any project structure control known from Idea allowing me to exclude some directories. I really don't like idea of changing my folder structure or creating some links just to satisfy needs of IDE. The second problem is that it reflects the physical directory structure - repositories/projects/folders are not merged as in CMake files.
Is it possible to define virtual project structure based on CMake files? CLion already has all the knowledge about location of files and structure of project directory (containing CMakeLists.txt). Now it only needs to give me better options to structure those files. As a side note, this is not a problem in Visual Studio or XCode but I need a cross platform IDE.