toolchain file: windows.clang.cmake
MSVC ABI compatible. Supports x86, x64, arm64(clang-8+).
- Copy of Windows SDK, only Include and Lib are used
- Copy of msvc sdk, only include and lib are used
- WINSDK_DIR (or environment var WindowsSdkDir): win10 sdk dir containing Include and Lib
- WINSDK_VER (or environment var WindowsSDKVersion): win10 sdk version
- MSVC_DIR (or environment var VCDIR): msvc dir containing include and lib
- UWP: build for uwp
- PHONE: build for windows phone
- ONECORE: use onecore
- USE_LIBCXX: use libc++ instead of msvcp
- WINRT: true if UWP or PHONE is set
- WINSTORE: same as WINRT
- WINDOWS_DESKTOP: not WINRT
- WINDOWS_XP: if CMAKE_SYSTEM_VERSION < 6.0
- _WIN32_WINNT
toolchain file: linux.clang.cmake
Clang(set by CMAKE_C_COMPILER or auto detect) and LLVM tools are auto detected and highest version is selected.
Also applies for raspberry pi, sunxi etc.
- USE_LIBCXX: use libc++ instead of libstdc++
- USE_CXXABI: can be c++abi, stdc++ and supc++. Only required if libc++ is built with none abi
- USE_COMPILER_RT: use compiler-rt instead of libgcc as compiler runtime library
- USE_STDCXX: libstdc++ version to use, MUST be >= 4.8. default is 0, selected by compiler
- LINUX_SYSROOT: sysroot dir
toolchain file: rpi.clang.cmake
NOTE: using linux.clang.cmake and a generic linux sysroot is enough for a modern arm64 rpi OS. Legacy rpi(1~3) includes brcm libraries.
- USE_LIBCXX (optional, default off): use libc++ instead of libstdc++
- CMAKE_SYSTEM_PROCESSOR: armv6
- RPI: 1
- OS: rpi
- CMAKE_CROSSCOMPILING: auto detected
- OS_RPI
toolchain file: ios.cmake (https://github.com/wang-bin/ios.cmake)
- IOS_ARCH: can be armv7, arm64, i386, x86_64 and any combination of above, e.g. "arm64;x86_64" to build universal 64bit binaries
- IOS_BITCODE (optional, default off)
- IOS_EMBEDDED_FRAMEWORK (optional, default off)
- IOS_DEPLOYMENT_TARGET (optional)
include(tools.cmake)
after project(...)
- Dead code elimination
- ELF hardened (through option
ELF_HARDENED
, default is on) - ELF separated debug symbol
- Windows XP support for VC (through option
WINDOWS_XP
, default is on) - Android system stdc++ dependency removal
- LTO: USE_LTO=thin/0/1/N/AUTO, default is off
- C++11 support for macOS 10.7
- asan, ubsan
- uninstall template
- ARCH: x86, x64, ${ANDROID_ABI}, empty for apple multi-arch build
- WINRT, WINSTORE
- OS=rpi, iOS, macOS, WinRT, android
- enable_ldflags_if
- mkdsym: create elf debug symbol file
- mkres: convert any binary to C/C++ byte array
- set_relocatable_flags: enable relocatable object target
- exclude_libs_all: forbid exporting symbols from static dependencies
- set_rpath: rpath/runpath flags for ELF and Mach-O
- target_sources: compatible implementation for cmake < 3.1
- OS_RPI: if build for raspberry pi