Change project root

Last modified: 11 February 2024

When you open a project, CLion treats the location of the top-level configuration file as project root. Also, in the case of CMake, when you create a new CMake project, CLion places the CMakeLists.txt file under the root.

However, your project may have a different structure. For example, your main project configuration script (CMakeLists.txt or other) can be located in some subdirectory. In this case, you need to change the project root manually.