summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-27 14:03:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-01-27 14:03:37 (GMT)
commit977811a8ff39d0f02048093e34c38debaffc2cd7 (patch)
treec1343bc429795855885401b688e7c0e946a4b270 /Help
parent7ab6d1e8317f61761ca7e57bc5cf774462a851ba (diff)
parent5a6379f1fd1cddd702e4f44844d20ed8e01b85ed (diff)
downloadCMake-977811a8ff39d0f02048093e34c38debaffc2cd7.zip
CMake-977811a8ff39d0f02048093e34c38debaffc2cd7.tar.gz
CMake-977811a8ff39d0f02048093e34c38debaffc2cd7.tar.bz2
Merge topic 'doc-system-processor'
5a6379f1fd Help: Clarify meaning of CMAKE_SYSTEM_PROCESSOR Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5744
Diffstat (limited to 'Help')
-rw-r--r--Help/variable/CMAKE_SYSTEM_PROCESSOR.rst13
1 files changed, 9 insertions, 4 deletions
diff --git a/Help/variable/CMAKE_SYSTEM_PROCESSOR.rst b/Help/variable/CMAKE_SYSTEM_PROCESSOR.rst
index 8ad89f1..ce16215 100644
--- a/Help/variable/CMAKE_SYSTEM_PROCESSOR.rst
+++ b/Help/variable/CMAKE_SYSTEM_PROCESSOR.rst
@@ -1,8 +1,13 @@
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
-you build for the host system instead of the target system when
-cross compiling.
+When cross-compiling, a :variable:`CMAKE_TOOLCHAIN_FILE` should set
+the ``CMAKE_SYSTEM_PROCESSOR`` variable to match target architecture
+that it specifies (via :variable:`CMAKE_<LANG>_COMPILER` and perhaps
+:variable:`CMAKE_<LANG>_COMPILER_TARGET`).