I think the patch to the set command is probably the best bet. Raise_scope
could be made to do the same thing but honestly the changes to set are
pretty simple and that clears up some confusion about raise scope not
setting the local variable and not actually raising the local variable's
setting. Aka raise_scope changed over time and set is now a better fit ffor
what is being done. Can you check that in Alex and mod the function test to
use it?

Thanks
Ken

Ken Martin PhD 
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971 

> -----Original Message-----
> From: Alexander Neundorf [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 18, 2008 12:54 PM
> To: cmake@cmake.org
> Cc: [EMAIL PROTECTED]
> Subject: Re: [CMake] Re: function and raise_scope commands
> 
> On Friday 18 January 2008, Rodolfo Schulz de Lima wrote:
> > Miguel A. Figueroa-Villanueva wrote:
> > > Again, I think this behaviour is a quite unintuitive and should be
> > > well documented, at least.
> >
> > I shall add that at first I expected 'raise_scope' to work like 'set'
> > when the parameter <value> is a list. But, for instance:
> >
> > set(mylist item1 item2 item3)
> >
> > set(var1 ${mylist})
> > raise_scope(var2 ${mylist})
> >
> > in this example, var1 gets the 3 items, whereas var2 gets only 'item1'.
> > That's odd and also counterintuitive.
> 
> How about the attached patch ?
> It adds an argument PARENT_SCOPE to the SET() command, which then replaces
> the
> RAISE_SCOPE() command:
> 
> set(foo a b c PARENT_SCOPE)
> 
> I'm not sure it is a good idea that this also propagates to the parent
> directory. What is a use case for this ?
> 
> Bye
> Alex

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to