-
Couldn't load subscription status.
- Fork 1.2k
CLion project setup
Timur Yusupov edited this page Feb 3, 2020
·
1 revision
There are two options for build system to use with YugabyteDB:
- make - this is well-supported by CLion, but slower for rebuild comparing to ninja.
- ninja - faster alternative, but CLion has limited support for ninja (for example it doesn’t allow to rebuild individual files https://youtrack.jetbrains.com/issue/CPP-17622)
Following steps are needed for configuring CLion project for YugabyteDB:
- Use “File / Open…” to open the project root directory.
- Put
build/debug-clang-dynamic(orbuild/debug-clang-dynamic-ninjaif you want to use ninja) as a “Generation path” in “Preferences/Build, Execution, Deployment/CMake”:
If you want to build with ninja, use build/debug-clang-dynamic-ninjaas a generation path and add-G Ninjainto “CMake options”:
- Use “File / Reload CMake Project'' - it should start building third party dependencies for YugabyteDB. Building a third party can take tens of minutes and then CLion will start updating symbols which also can take a while.
- Run from the command line inside project root (omit
YB_USE_NINJA=0if you want to use ninja):
YB_USE_NINJA=0 ./yb_build.sh
- Subsequent builds could be launched from CLion.
Like what you see? Don't forget to star us!