CMake, CLion and Git

We have the following directory structure:

I would like to have add the cmake directory to the search path when I work on a particular project. Notice that there are 3 separate projects using a common git repository. I try using an environment variable, but that does not work well because I have to manually set it for CLion. Alternately, I want $PROJECT_DIR$/.. but that is Linux specific syntax I think.

1 comment

Ideally, I need to support Windows, Linux (Ubuntu) and MacOS. If I could call git from within CMake, that might be ideal, but I don't think that is possible (unless CLion has some magic).


Please sign in to leave a comment.