In CLion, all the settings required for building a project are incorporated in a CMake profile. It accumulates toolchains, build types, CMake options, and environment variables (in other words, the compiler, linker, and CMake settings). You can create multiple profiles with different build types and toolchains:
This approach enables you, for example, to use different compilers for one project, or to build CMake targets with differing settings.
To build a target using a specific profile, select the necessary profile in the run configuration switcher on the toolbar (or press Shift+Alt+F10 for Run and Shift+Alt+F9 for Debug):