Help: CMAKE_APPLE_SILICON_PROCESSOR cannot be set in a toolchain file

`CMakeDetermineSystem` determines the host system information before
loading the toolchain file.

Issue: #22012
This commit is contained in:
Brad King
2021-04-01 09:59:59 -04:00
parent 22612dd53a
commit 3f04f69733

View File

@@ -8,8 +8,7 @@ CMake what architecture to use for :variable:`CMAKE_HOST_SYSTEM_PROCESSOR`.
The value must be either ``arm64`` or ``x86_64``. The value must be either ``arm64`` or ``x86_64``.
The value of this variable should never be modified by project code. The value of this variable should never be modified by project code.
It is meant to be set by a toolchain file specified by the It is meant to be set as a cache entry provided by the user,
:variable:`CMAKE_TOOLCHAIN_FILE` variable, or as a cache entry e.g. via ``-DCMAKE_APPLE_SILICON_PROCESSOR=...``.
provided by the user, e.g. via ``-DCMAKE_APPLE_SILICON_PROCESSOR=...``.
See also the :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment variable. See also the :envvar:`CMAKE_APPLE_SILICON_PROCESSOR` environment variable.