CMAKE_SYSTEM_PROCESSOR

From Get docs
Cmake/docs/3.21/variable/cmake system processor


CMAKE_SYSTEM_PROCESSOR

When not cross-compiling, this variable has the same value as the CMAKE_HOST_SYSTEM_PROCESSOR variable. In many cases, this will correspond to the target architecture for the build, but this is not guaranteed. (E.g. on Windows, the host may be AMD64 even when using a MSVC cl compiler with a 32-bit target.)

When cross-compiling, a CMAKE_TOOLCHAIN_FILE should set the CMAKE_SYSTEM_PROCESSOR variable to match target architecture that it specifies (via CMAKE__COMPILER and perhaps CMAKE__COMPILER_TARGET).

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/variable/CMAKE_SYSTEM_PROCESSOR.html