1CMAKE_HOST_SYSTEM_PROCESSOR 2--------------------------- 3 4The name of the CPU CMake is running on. 5 6Windows Platforms 7^^^^^^^^^^^^^^^^^ 8 9On Windows, this variable is set to the value of the environment variable 10``PROCESSOR_ARCHITECTURE``. 11 12Unix Platforms 13^^^^^^^^^^^^^^ 14 15On systems that support ``uname``, this variable is set to the output of: 16 17- ``uname -m`` on GNU, Linux, Cygwin, Android, or 18- ``arch`` on OpenBSD, or 19- on other systems, 20 21 * ``uname -p`` if its exit code is nonzero, or 22 * ``uname -m`` otherwise. 23 24macOS Platforms 25^^^^^^^^^^^^^^^ 26 27The value of ``uname -m`` is used by default. 28 29On Apple Silicon hosts, the architecture printed by ``uname -m`` may vary 30based on CMake's own architecture and that of the invoking process tree. 31 32.. versionadded:: 3.19.2 33 34 On Apple Silicon hosts: 35 36 * The :variable:`CMAKE_APPLE_SILICON_PROCESSOR` variable or 37 the :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment variable 38 may be set to specify the host architecture explicitly. 39 40 * If :variable:`CMAKE_OSX_ARCHITECTURES` is not set, CMake adds explicit 41 flags to tell the compiler to build for the host architecture so the 42 toolchain does not have to guess based on the process tree's architecture. 43