Configure a CLion project
There are two options for build systems that you can use with YugabyteDB,
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.
ninjais 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).
makeis well-supported by CLion, but slower, particularly for rebuilding mostly-built projects, compared to
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":
Setting CMake preferences when using Make
build/debug-clang-dynamic as the Generation path in Preferences > Build, Execution, Deployment/CMake”, and do not specify anything for CMake 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.