Switching between toolchains per project

Answered

Hi. Maybe I have not fully understood how the toolchain management works in CLion. Here is my situation:

There are times that I need to have 2 instances of CLion. one for a native toolchain (e.g. Visaul Studio) and one for a cross compiler (e.g arm-linux):

What should I do when starting CLion in this case? Should I open up the Settings and for each instance move the desired toolchain to the top place?

 

In general, how to switch between toolchains, or set default toolchain PER PROJECT.

1 comment
Comment actions Permalink

Hello!

>Should I open up the Settings and for each instance move the desired toolchain to the top place?

The toolchain settings (`File | Settings | Build, Execution, Deployment | Toolchains` ) are global, so this won't work.

There are project-specific settings for this purpose:

If you work with CMake projects, you can specify what toolchain should be used for this particular project in the CMake profile (`File | Settings | Build, Execution, Deployment | CMake`).

In case of Makefile projects, you can do that in `File | Settings | Build, Execution, Deployment | Makefile` (https://www.jetbrains.com/help/clion/makefiles-support.html#makefile-settings).

1

Please sign in to leave a comment.