Cannot set custom CMake property for cache variable
CMake docs describe a way to define and set custom properties for (among others) cache variables. However I cannot make it work. Lets say I have this minimal example:
cmake_minimum_required(VERSION 3.7)
project(x)
define_property(CACHED_VARIABLE PROPERTY A_PROPERTY BRIEF_DOCS "brief" FULL_DOCS "full")
set(A_VARIABLE "variable value" CACHE STRING "helpstring")
set_property(CACHE A_VARIABLE PROPERTY A_PROPERTY "property value")
Trying to configure it gives an error:
$ cmake .
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:6 (set_property):
set_property given invalid CACHE property A_PROPERTY. Settable CACHE
properties are: ADVANCED, HELPSTRING, STRINGS, TYPE, and VALUE.
-- Configuring incomplete, errors occurred!
See also "/tmp/x/CMakeFiles/CMakeOutput.log".
It seems that the properties of cache variables which are writable are hardcoded in here and this list may not be extended in any way (other than changing the code). Is this a bug in code or a bug in documentation?