HowToAddToolchain
CMake has support for toolchain files, that can be used to easily setup CMake projects for a different compiler. Checkout CMake toolchains for more information about CMake Toolchains.
The plugin supports multiple toolchain files, but it requires a little configuration to be able to find your files. Initially the context menu looks like the following:
The plugin requires all toolchain files to be located within the same directory with the naming pattern "toolchain..cmake". The name will then be displayed in the context menu. So if you have a directory with two files
- toolchain.arm-linux-gnueabihf.cmake
- toolchain.host.cmake
The context menu will look like the following:
The path to this directory can be specified within the path preferences:
If correctly setup, you can switch between the toolchains and build cross compile binaries easily.