[cmake-developers] Test for list size
Torsten at Robitzki.de
Wed Dec 12 07:01:41 EST 2018
we have often the need to test for a minimum list size
list(LENGTH list list_size)
if (list_size GREATER 1)
This happens so much, that we though it might be helpful to extend the if-syntax to allow this to be written in a more compact way. For example:
if (LENGTH list GREATER 1)
Or maybe by introducing functions that can return values (length being a „function“ here):
if (length[list] GREATER 1)
What do you think? Are we the only ones that could make good use out of this extension?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Message signed with OpenPGP
More information about the cmake-developers