How do I set subdirectory as work directory?

Answered

I'm evaluating migrating from vim+youcompleteme to clion. My project structure looks like follows:

In the parent directory, I have CMakeLists.txt, as well as compile_cammands.json and project source directories.

To build project, I cd into subdirectory called work, from which I run cmake .. && make

When I open the project in clion, the build fails because it can't find additional files. It fails because there are additional files, and to search for them, clion needs to consider work subdirectory as build root

How do I tell clion to build the project in the same way I build it from console?

0
1 comment

Hello!

Please try the following: go to `File | Settings | Build, Execution, Deployment | CMake` and specify "work" in the "Build directory" field.

0

Please sign in to leave a comment.