13

I started trying to use of CLion 2018.2 today and the first problem with I stuck is how to switch toolchains in CLion.

I want to switch the toolchain from MinGW to Visual Studio and I can switch it by making Visual Studio toolchain as default (File->Settings->Build, Execution, Deployment->Toolchains->Select Visual Studio->Click Up arrow).

enter image description here

But I don't want to make this toolchain as default. I just wanted to try it.

Should I press this up arrow button if I want to switch toolchains or there is any simpler way?

Thanks.

2 Answers2

14

No need to many any toolchain a default one. Do the following:

  1. Configure all necessary toolchains in settings. https://www.jetbrains.com/help/clion/how-to-create-toolchain-in-clion.html
  2. Then in Settings | Build, Execution, Deployment | CMake configure several CMake profiles using different toolchains. https://www.jetbrains.com/help/clion/configuring-cmake.html#CMProfile
  3. Then in the same switcher where you can change the run/debug configuration, there is also a list of available CMake profiles with corresponding toolchains. Select the combination you need and then you can run/debug.
nastasiak2512
  • 1,857
  • 14
  • 14
8

1. Add Toolchains:

enter image description here

2. Switch in CMake tab, like below:

enter image description here

Jayhello
  • 5,931
  • 3
  • 49
  • 56
  • 1
    If you're using a remote toolchain with automatic deployments don't forget that the deployments are a separate setting from the toolchain. Even if your toolchain points to a new host your deployments will still go to the old one until you update the deployment settings as well. – Alex Jansen May 29 '19 at 22:38