.. _custom_cmake_toolchains: Custom CMake Toolchains ####################### To use a custom toolchain defined in an external CMake file, export the following environment variables: .. code-block:: console # Linux and macOS export ZEPHYR_TOOLCHAIN_VARIANT= export TOOLCHAIN_ROOT= # Windows set ZEPHYR_TOOLCHAIN_VARIANT= set TOOLCHAIN_ROOT= You can also set them as CMake variables when generating a build system for a Zephyr application, like so: .. code-block:: console cmake -DZEPHYR_TOOLCHAIN_VARIANT=... -DTOOLCHAIN_ROOT=... Zephyr will then include the toolchain cmake file located in: ``/cmake/toolchain/.cmake``.