Meson projects
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.
Install Meson
Follow the official installation guide to install Meson on your system.
Open Meson projects
Select Open on the Welcome screen.
from the main menu or clickPoint 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:
Configure the toolchain and build options for Meson
Go to
.In this dialog, you can configure the toolchain, build directory, and build options for your project:
Edit meson.build and reload the 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.
Run/debug configurations for Meson
CLion detects the project build targets and creates the Native Application configurations for them:
In the main menu, go to
to set up additional parameters if required:
Build, run, and debug
Use the actions in the
menu to build the project or the selected configuration.To run or debug your program, you can use the configuration widget (click or ), the
menu, or the gutter icons next to the program's entry point:Refer to Run applications and Debug for more information.
Current limitations
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).