Permit calling commands with `::` in the name
Writing CMake libraries can be difficult as it is easy for users to peek inside and not know whether a given command is for external or internal use. Additionally, it can be troublesome if (for whatever reason) another library shares the same name. The specific rules for identifiers would be:
- Identifiers MUST NOT start with a
:
- Identifiers MUST NOT end with a
:
- Identifiers with a single
:
are still not callable.
As a result, this means there could be a command named cmake::regex
or cmake::json
. (I am aware of the desire to make any JSON related commands string(JSON)
, but this is simply used as an example)
Everything would work the same. You still cannot do ${var}(args...)
and you can still define a function with a non-identifier name (e.g., function(😈💢💥🥟)
for use with things like variable_watch
.