Meson projects
Meson version: 0.54 or higher
In CLion, you can open, build, and run/debug Meson projects. Meson support works on all platforms and for all local and remote toolchains, including WSL and Docker.
Follow the official installation guide to install Meson on your system.
Select File | Open from the main menu or click Open on the Welcome screen.
Point CLion to the directory containing meson.build and click Open.
CLion will load the Meson project structure and show the results in the Build tool window:
Go to Settings | Build, Execution, Deployment | Meson.
In this dialog, you can configure the toolchain, build directory, and build options for your project:
When you make changes in meson.build, CLion shows an icon suggesting to reload the project:
Click the icon or press the shortcut.
Alternatively, you can reload the project by using the actions in Tools | Meson:
Use Wipe and reload Meson Project to preform wipe before reload.
tip
From this menu, you can also Change project root.
CLion detects the project build targets and creates the Native Application configurations for them:
In the main menu, go to Run | Edit Configurations to set up additional parameters if required:
Use the actions in the Build menu to build the project or the selected configuration.
tip
Learn more in Build actions.
To run or debug your program, you can use the configuration widget (click
or
), the Run menu, or the gutter icons next to the program's entry point:
Refer to Run applications and Debug for more information.
Creating Meson projects is not yet supported (CPP-31647.
Better code highlighting and assistance in the meson.build files and Structure View for them are in development (CPP-35183).
Meson options are not customizable at the moment (CPP-35165, CPP-35316).
Multiple profiles are not yet supported (CPP-32148).