mirror of
https://github.com/Kitware/CMake.git
synced 2026-06-24 08:47:59 +00:00
When a built-in cache variable is set via `-D <var>=<value>` with no help text supplied, populate `HELPSTRING` from the built-in documentation table (sourced from `Help/variable/*.rst` and the per-language pattern manuals). Project-defined and unknown variables continue to receive the legacy "No help, variable specified on the command line." sentinel. The cache entry's type and value are left untouched: type stays `UNINITIALIZED` for bare `-D` and an explicit `-D <var>:TYPE=<value>` is honored as before. The `cmCacheManager::LoadCache` path is not modified, so reload of existing caches is a fixed point. Fixes: #27830
10 lines
594 B
CMake
10 lines
594 B
CMake
# Defines a placeholder-shaped built-in cache variable on the command
|
|
# line for a language combination the underlying ``.rst`` manual
|
|
# explicitly excludes (``CMAKE_<LANG>_CPPCHECK`` applies only when
|
|
# ``<LANG>`` is C or CXX; this test passes ``HIP``). The matcher is
|
|
# intentionally permissive: it accepts the name and returns the
|
|
# pattern's Summary, which is installed as the entry's HELPSTRING;
|
|
# the per-language restriction is documented in the Summary prose,
|
|
# not enforced by the matcher. This case validates the "permissive
|
|
# matching with restriction-in-prose" design end-to-end.
|