Use this page to configure CMake behavior in your project. The settings described
here are project-related; this page is marked with icon.
Item
Description
Automatically reload CMake project on editing
If this check box is selected, CLion automatically reloads a project while editing a CMake file.
If this check box is not selected, after editing a CMake file a banner shows up, where you can choose
to reload the current project manually, or enable automatic reload, which leads to selecting this check box:
However, if external changes take place
(for example, version control update), the CMake project reloads anyway.
Generation
In this section, specify the options and environment variables related to the Generation phase of CMake.
Item
Description
CMake options
In this text field, type the additional CMake options
to be passed to the CMake command. The options should be delimited with spaces.
You can also click to type the
required options in the editor window, each option on a new line.
Pass system environment/ Do not pass environment/ Pass custom environment <variable name>=<value>/ Pass system and custom environment: <variable name>=<value>
Use this section to specify the environment and/or custom variables to be passed to the Generation phase of CMake.
Note that the section's name changes depending on the setting
of the check box Pass system environment variables and the presence of custom
variables in the table of custom variables.
Table of custom variables
This table lists the custom variables (if any). Passing s custom variable overwrites the system one,
thus allowing the user to add or change a system variable to/in CMake.
Use , , and buttons to manage the list of custom variables.
Show
Click this link to show the list of system environment variables and their values.
Pass system environment variables
Select this check box to pass system environment variables to the Generation phase of CMake.
Build
In this section, specify the options related to the Build phase of CMake:
Item
Description
Build options
In this text field, specify the options to be passed to the build tool used by CMake.
Find more information about the available build options in the CMake documentation.
You can also click to type the required options in the editor window.
If nothing is specified, the default setting
-j <number_of_cpu> is used.
Build output path
Specify here location of the build output:
Click the browse button to select the desired path from the Path Chooser dialog.
Leave this field blank to use default CMake location for generated build files.
This setting is saved in .idea/workspace.xml and is not supposed to be shared.
Note: If you select a subdirectory of the project root as the build output, the IDE marks
the files of that subdirectory as excluded from the project and considers them as non-project files. Navigation actions like Navigate to file are not applicable to these files.