[CMake] functions as first class objects

David Manura dm.lua at math2.org
Fri Nov 20 00:55:22 EST 2009


On Thu, Nov 19, 2009 at 10:44 AM, Michael Wild wrote:
> Anyways, I didn't want to get into a language-war, but rather voiced my
> dislike for such dubious flexibility. CMake is very domain-specific language
> used to create build systems, not a general-purpose language.

My syntax might not have been the best.  I was using "&" in the Perl
sigil sense rather than the C address of sense.  I'm also not really
clear on the evaluation semantics of the CMake language from the
reference manual.

However, the way I see it, CMake seems to already have the basic
functionality of interest.  Defining a function "foo" creates a symbol
"_foo" that references the previous value of "foo".  The main
limitation here is that the name "_foo" is automatically chosen.
Perhaps "_foo" is already used and we don't want to overwrite it but
rather want to use the symbol "__foo" or something else.


More information about the CMake mailing list