How to get CLion work with a complex project folder?

recently i come across this project.

let's say its root folder is ~/

then its headers are in ~/inc/

and its source files are in ~/src/

and for some reason, they add this to CMakeList.txt:


as a result they include all there headers like this:

#include "header.h"

which originally should be like this:

#include "../inc/header.h".


here is the problem:

the code compelete is not working for the symbles in those headers!

like the headers are not included at all.

although the project can be build correctly.


what should i do to get it work?

Is this a bug?

1 comment
Comment actions Permalink

Please use mark directory as project sources and headers feature or create a dummy target in CMakeLists.txt.


Please sign in to leave a comment.