On Fri, Feb 10, 2012 at 10:00 AM, Robert Dailey wrote:
> Also I wonder what happens if you do this:
>
> set( var PARENT_SCOPE PARENT_SCOPE PARENT_SCOPE )
>
That sets var to "PARENT_SCOPE;PARENT_SCOPE" in the parent scope.
>
> -
> Robert Dailey
>
>
>
> On Fri, Feb 10, 2012 at 8:59 AM,
On 02/10/2012 03:59 PM, Robert Dailey wrote:
> I actually found that using the following worked the exact same for me:
>
> set( var "" PARENT_SCOPE )
>
> It passed the "NOT" test in my if condition:
>
> if( NOT var )
> ...
> endif()
Does it pass the "NOT DEFINED" test, too? There's a difference
Also I wonder what happens if you do this:
set( var PARENT_SCOPE PARENT_SCOPE PARENT_SCOPE )
-
Robert Dailey
On Fri, Feb 10, 2012 at 8:59 AM, Robert Dailey wrote:
> I actually found that using the following worked the exact same for me:
>
> set( var "" PARENT_SCOPE )
>
> It passed the
I actually found that using the following worked the exact same for me:
set( var "" PARENT_SCOPE )
It passed the "NOT" test in my if condition:
if( NOT var )
...
endif()
It might make more sense to require 2 parameters for set() (the variable
name and its value). If setting to nothing, use a bl
Yes, PARENT_SCOPE must occur as the last argument. Each command has its own
code for processing its argument list. See Source/cmSetCommand.cxx for
details on this one.
Interesting (not quite the right adjective?) side effect: it's difficult to
set a variable to the value "PARENT_SCOPE" because you
That worked, thanks David.
I guess CMake goes right-to-left for function parameters? I don't see how
else it doesn't think PARENT_SCOPE is a value instead of an option.
-
Robert Dailey
On Thu, Feb 9, 2012 at 1:45 PM, David Cole wrote:
> On Thu, Feb 9, 2012 at 2:41 PM, Robert Dailey w
On Thu, Feb 9, 2012 at 2:41 PM, Robert Dailey wrote:
> I didn't try that because I thought it would actually treat PARENT_SCOPE
> as a string and add it to the variable. I did this instead:
>
> set( var "" PARENT_SCOPE )
>
That leaves it set, with a value of the empty string, in the parent scope
I didn't try that because I thought it would actually treat PARENT_SCOPE as
a string and add it to the variable. I did this instead:
set( var "" PARENT_SCOPE )
-
Robert Dailey
On Thu, Feb 9, 2012 at 1:26 PM, David Cole wrote:
> On Thu, Feb 9, 2012 at 2:22 PM, Alexander Neundorf <
> a.
On Thu, Feb 9, 2012 at 2:22 PM, Alexander Neundorf
wrote:
> On Thursday 09 February 2012, Robert Dailey wrote:
> > It would seem useful to have a PARENT_SCOPE option for the unset()
> command,
> > just like its set() counterpart. Is there a particular reason why it does
> > not have it now?
>
> No
On Thursday 09 February 2012, Robert Dailey wrote:
> It would seem useful to have a PARENT_SCOPE option for the unset() command,
> just like its set() counterpart. Is there a particular reason why it does
> not have it now?
No, I think there is not particular reason.
Alex
--
Powered by www.kitwa
It would seem useful to have a PARENT_SCOPE option for the unset() command,
just like its set() counterpart. Is there a particular reason why it does
not have it now?
-
Robert Dailey
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensou
11 matches
Mail list logo