Commit 5a6379f1 authored by Brad King's avatar Brad King
Browse files

Help: Clarify meaning of CMAKE_SYSTEM_PROCESSOR

On Windows the value may not match the compiler's target architecture.
Update the documentation to state this explicitly.

Issue: #15170
parent 1380e611
CMAKE_SYSTEM_PROCESSOR CMAKE_SYSTEM_PROCESSOR
---------------------- ----------------------
The name of the CPU CMake is building for. When not cross-compiling, this variable has the same value as the
:variable:`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.)
This variable is the same as :variable:`CMAKE_HOST_SYSTEM_PROCESSOR` if When cross-compiling, a :variable:`CMAKE_TOOLCHAIN_FILE` should set
you build for the host system instead of the target system when the ``CMAKE_SYSTEM_PROCESSOR`` variable to match target architecture
cross compiling. that it specifies (via :variable:`CMAKE_<LANG>_COMPILER` and perhaps
:variable:`CMAKE_<LANG>_COMPILER_TARGET`).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment