Re: [CMake] Question about PARENT_SCOPE

2010-05-03 Thread Benoit Thomas
On 2010-05-03 15:00, Clinton Stimpson wrote: On Monday 03 May 2010 12:42:58 pm Benoit Thomas wrote: Hello, Is it possible to do something like this (sorry if there are typos): function (bar v scope) set (v 1 GRAND_PARENT_SCOPE) endfunction() function (foo v) bar (${v} PARENT_S

Re: [CMake] Question about PARENT_SCOPE

2010-05-03 Thread Benoit Thomas
On 2010-05-03 15:19, Alexander Neundorf wrote: On Monday 03 May 2010, Benoit Thomas wrote: function (foo v) bar (${v} PARENT_SCOPE) endfunction() You could have bar() use PARENT_SCOPE to set it in a variable in bar(), which could then itself set it to PARENT_SCOPE. Would that w

Re: [CMake] Question about PARENT_SCOPE

2010-05-03 Thread Alexander Neundorf
On Monday 03 May 2010, Benoit Thomas wrote: > Hello, > > Is it possible to do something like this (sorry if there are typos): > > function (bar v scope) > set (v 1 GRAND_PARENT_SCOPE) > endfunction() No :-) > function (foo v) > bar (${v} PARENT_SCOPE) > endfunction() You could have bar

Re: [CMake] Question about PARENT_SCOPE

2010-05-03 Thread Clinton Stimpson
On Monday 03 May 2010 12:42:58 pm Benoit Thomas wrote: > Hello, > > Is it possible to do something like this (sorry if there are typos): > > function (bar v scope) > set (v 1 GRAND_PARENT_SCOPE) > endfunction() > > function (foo v) > bar (${v} PARENT_SCOPE) > endfunction() > > foo (v)

[CMake] Question about PARENT_SCOPE

2010-05-03 Thread Benoit Thomas
Hello, Is it possible to do something like this (sorry if there are typos): function (bar v scope) set (v 1 GRAND_PARENT_SCOPE) endfunction() function (foo v) bar (${v} PARENT_SCOPE) endfunction() foo (v) message ("${v} == 1") If it's not possible, I'll go with global variables. Curre