Whatever you do in CLion, you do that in the context of a project. A project is an organizational unit that represents a complete software solution. It serves as a basis for coding assistance, bulk refactoring, coding style consistency, etc.
CLion supports three project formats: CMake, JSON compilation database, and Gradle (see Project Formats for details).
A project in CLion is represented in the Directory Based Format. The project directory contains the
.idea directory (not visible in the Project view of the Project Tool Window), with the following files:
*.imlfile that describes the project structure.
workspace.xmlfile that contains your workspace preferences.
- A number of
.xmlfile is responsible for its own set of settings, that can be recognized by its name:
Thus, for example, adding a new run/debug configuration and changing encoding will affect two different
.xmlfiles. This helps avoid merge conflicts when the project settings are stored in a version control system and modified by the different team members.
Project root directory
Any project in CLion should be encapsulated within the project directory, a root directory of which is referred to as a project root directory and contains all the project files and subdirectories, including configuration, data, source, and other files, related to the given project.
Project root directory contains one or more files of project description (which are also the inputs to the build system in case of CMake or Gradle): CMakeLists.txt for CMake, build.gradle for Gradle, and compile_commands.json for compilation database.