From 8b25e11fedd3fd53a38076ea2ed3b9175aa5db32 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 14 Sep 2025 23:38:51 +0200 Subject: [PATCH] CMakeDependentOption: Document project and script mode This module also works in script mode. This is a sync with the option() command which mentions how the variable behaves in project and script mode. --- Modules/CMakeDependentOption.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Modules/CMakeDependentOption.cmake b/Modules/CMakeDependentOption.cmake index 3db05da920..0d840fcfe0 100644 --- a/Modules/CMakeDependentOption.cmake +++ b/Modules/CMakeDependentOption.cmake @@ -10,7 +10,7 @@ default values depend on specified conditions or other options. This helps maintain a clean configuration interface by only displaying options that are relevant to the current settings. -Load this module in a CMake project with: +Load this module in CMake with: .. code-block:: cmake @@ -82,6 +82,9 @@ This module provides the following command: The value assigned to a local variable named ````, when ```` evaluates to boolean false. + In CMake project mode, boolean cache variables are created as explained + above. In CMake script mode, boolean variables are set instead. + Examples ^^^^^^^^