From 4d23636694f88c5a34926bae1f26d90a229d6773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 24 Mar 2023 10:59:23 +0200 Subject: Warn if CMAKE_CROSSCOMPILING is true without CMAKE_SYSTEM_NAME set Also clarify the `CMAKE_CROSSCOMPILING` documentation to state that CMake sets the variable automatically. --- Help/variable/CMAKE_CROSSCOMPILING.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Help') diff --git a/Help/variable/CMAKE_CROSSCOMPILING.rst b/Help/variable/CMAKE_CROSSCOMPILING.rst index 7e6ec3371f..16dbfa59c5 100644 --- a/Help/variable/CMAKE_CROSSCOMPILING.rst +++ b/Help/variable/CMAKE_CROSSCOMPILING.rst @@ -1,15 +1,15 @@ CMAKE_CROSSCOMPILING -------------------- -Intended to indicate whether CMake is cross compiling, but note limitations -discussed below. +This variable is set by CMake to indicate whether it is cross compiling, +but note limitations discussed below. This variable will be set to true by CMake if the :variable:`CMAKE_SYSTEM_NAME` variable has been set manually (i.e. in a toolchain file or as a cache entry from the :manual:`cmake ` command line). In most cases, manually -setting :variable:`CMAKE_SYSTEM_NAME` will only be done when cross compiling, -since it will otherwise be given the same value as -:variable:`CMAKE_HOST_SYSTEM_NAME` if not manually set, which is correct for +setting :variable:`CMAKE_SYSTEM_NAME` will only be done when cross compiling +since, if not manually set, it will be given the same value as +:variable:`CMAKE_HOST_SYSTEM_NAME`, which is correct for the non-cross-compiling case. In the event that :variable:`CMAKE_SYSTEM_NAME` is manually set to the same value as :variable:`CMAKE_HOST_SYSTEM_NAME`, then ``CMAKE_CROSSCOMPILING`` will still be set to true. -- cgit v1.2.1