[cmake-developers] real functions (was: $LIST_LENGTH{} syntax)

Brad King brad.king at kitware.com
Tue Jan 22 10:37:17 EST 2019


On 1/22/19 10:28 AM, Torsten at Robitzki.de wrote:
> With `$CACHE{VAR}` and `$ENV{VAR}` we already have the syntax for calling a „function“. 

No, there is no obvious way to pass arguments, handle nested quoting, etc.
The language was not designed for that.  That is a big can of worms I'd rather
not open just to solve the list length problem which is already only 2 lines.

> Once we have this, it would be possible to define $LIST_LENGTH in the CMake language

Not as efficiently as a dedicated syntax for the only language construct
we have that resembles a data structure.

-Brad


More information about the cmake-developers mailing list