[CMake] lexical scoping
Bill Hoffman
bill.hoffman at kitware.com
Sat Nov 3 11:13:55 EDT 2007
David Cole wrote:
> After all the discussion / suggestions that have been part of this
> thread, I like the following best:
>
> local(scope_name)
> set(var1 "value1")
> set(var2 "value2")
> endlocal(scope_name)
>
I would prefer to declare the variables that are part of the scope. I
think you would want to reference and set global variables from within a
scope. The PARENT_SCOPE maybe needed as well.
local(scope_name var1 var2 ... varN)
endlocal(scope_name)
-Bill
More information about the CMake
mailing list