Configure a CLion project

CLion project setup.

There are two options for build systems that you can use with YugabyteDB, ninja and make. Note that the CMake meta build system is used in both cases, and it generates build files consumed by the underlying Ninja and Make build systems.

  • ninja is faster than make, especially for rebuilding mostly-built projects, but CLion has limited support for ninja (for example, it doesn't allow you to rebuild individual files).
  • make is well-supported by CLion, but slower, particularly for rebuilding mostly-built projects, compared to ninja.

Configure a CLion project for YugabyteDB

Opening the directory

Click File > Open… to open the project root directory.

Configuring CMake preferences

Setting CMake preferences when using Ninja

If you want to build with Ninja, use build/debug-clang-dynamic-ninja as a "Generation path" and add -G Ninja into "CMake options":

Clion Ninja options

Setting CMake preferences when using Make

Select build/debug-clang-dynamic as the Generation path in Preferences > Build, Execution, Deployment/CMake”, and do not specify anything for CMake options.

CLion Make options

Reloading the project

Use "File / Reload CMake Project". CLion will start updating symbols, which also can take a while.

Doing the build from CLion

Run from the command line inside project root outside CLion (omit YB_USE_NINJA=0 if you want to use Ninja):


Subsequent builds can be launched also from CLion.