CLion 2023.3 Help

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

  1. Follow the official installation guide to install Meson on your system.

Open Meson projects

  1. Select File | Open from the main menu or click Open on the Welcome screen.

  2. Point CLion to the directory containing meson.build and click Open.

  3. CLion will load the Meson project structure and show the results in the Build tool window:

    Meson project loaded

Configure the toolchain and build options for Meson

  1. Go to Settings | Build, Execution, Deployment | Meson.

  2. In this dialog, you can configure the toolchain, build directory, and build options for your project:

    Meson settings

Edit meson.build and reload the project

  • When you make changes in meson.build, CLion shows an icon suggesting to reload the project:

    Reload project icon

    Click the icon or press the shortcut.

  • Alternatively, you can reload the project by using the actions in Tools | Meson:

    Meson menu actions

    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:

    Meson project configurations
  • In the main menu, go to Run | Edit Configurations to set up additional parameters if required:

    Native Application configurations for Meson

Build, run, and debug

  • Use the actions in the Build menu to build the project or the selected configuration.

    The Build menu
  • 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:

    Gutter icon for run/debug

    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).

Last modified: 11 February 2024