CLion
 
Get CLion
Join the CLion 2025.1 Early Access Program and try out new features before they are released! Find out more

Custom build targets and applications

Last modified: 28 June 2024

Custom build targets are independent of any particular build system or project model: CLion uses external tools of your choice for building the sources and cleaning build artifacts.

Custom targets are especially useful for compilation database projects. Although compile_commands.json itself lacks the information required for building and therefore running applications, custom targets and custom run/debug configurations help bypass this limitation.

In the following example, we will add a target to a compilation database project, get build results, and then create a custom configuration to run the executable right from CLion.