-
Notifications
You must be signed in to change notification settings - Fork 8
Toolchains
CMake uses the concept of toolchain files to allow customization of the build to the local build environment and machine. It contains a description of the toolchain, build and target systems, target parameters, runtime environment, etc. The cache variable CMAKE_TOOLCHAIN_FILE
can be configured to point to a CMake toolchain file during the configuration step of the build.
Since this is possibly highly dependent on your local setup, we encourage you to write your own toolchain file if needed. As a starting point, we provide these toolchain files that we use ourselves in our internal CI system.
- debian_clang_x86_64.cmake
- debian_clang_x86.cmake
- debian_gcc_arm32v7.cmake
- debian_gcc_arm_aarch64.cmake
- debian_gcc_x86_64.cmake
- debian_gcc_x86.cmake
- ios_clang_arm64.cmake
- ios_clang_x86_64.cmake
- macos_clang_arm64.cmake
- macos_clang_x86_64.cmake
- ubuntu_clang_riscv64.cmake
- ubuntu_clang_x86_64.cmake
- ubuntu_clang_x86.cmake
For Android builds using the Android NDK and WebAssembly builds using Emscripten, we use the toolchain files provided by the toolchain vendors and recommend you do the same. In the Android NDK, the toolchain file is located in <ndk_path>/build/cmake/android.toolchain.cmake, where <ndk_path> is the install location of the Android NDK. Furthermore, using Emscripten's emcmake
tool will set up the toolchain automatically.