> Am 22.01.2019 um 13:33 schrieb Brad King <brad.k...@kitware.com>:
> 
> On 1/22/19 7:09 AM, tors...@robitzki.de wrote:
> 
>> How about adding the ability to add such function? Like:
>> 
>> procedure(LIST_LENGTH list)
>>  list(LENGTH list length)
>>  return(${length})
>> endprocedure()
> 
> We don't have a syntax for invoking functions with return values.
> That’s a whole other discussion.

With `$CACHE{VAR}` and `$ENV{VAR}` we already have the syntax for calling a 
„function“. What is missing, is a command to define a function and a command to 
specify the return value of a function.

Once we have this, it would be possible to define $LIST_LENGTH in the CMake 
language itself. And real functions with return values could make writing in 
CMake language much more easier.

Attachment: signature.asc
Description: Message signed with OpenPGP

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to