From 5da34d2f45c6fa7889e24a548776db1972a86ecf Mon Sep 17 00:00:00 2001 From: 15daksh-2003 Date: Sun, 6 Sep 2026 21:13:31 +0530 Subject: [PATCH] Help: link CMAKE_SYSTEM_NAME script-mode note to CMAKE_HOST_SYSTEM_NAME Fixes: #27085 --- Help/variable/CMAKE_SYSTEM_NAME.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Help/variable/CMAKE_SYSTEM_NAME.rst b/Help/variable/CMAKE_SYSTEM_NAME.rst index 90b26ba6df..8e16e54bf2 100644 --- a/Help/variable/CMAKE_SYSTEM_NAME.rst +++ b/Help/variable/CMAKE_SYSTEM_NAME.rst @@ -4,8 +4,9 @@ CMAKE_SYSTEM_NAME The name of the operating system for which CMake is to build. See the :variable:`CMAKE_SYSTEM_VERSION` variable for the OS version. -Note that ``CMAKE_SYSTEM_NAME`` is not set to anything by default when running -in script mode, since it's not building anything. +When run in :option:`cmake -P` script mode, CMake sets +:variable:`CMAKE_HOST_SYSTEM_NAME` but does not set ``CMAKE_SYSTEM_NAME`` by +default, since it's not building anything. System Name for Host Builds ^^^^^^^^^^^^^^^^^^^^^^^^^^^