On Mon, Mar 30, 2009 at 2:41 PM, Bill Hoffman <[email protected]>wrote:

> Alexander Neundorf wrote:
>
>> On Monday 30 March 2009, Robert Dailey wrote:
>>
>>> Hi,
>>> What's the proper way to define a list? Suppose I have 3 words: Foo, Bar,
>>> and Baz. I want these 3 strings to be in a list called Stuff. Would I do
>>> this:
>>>
>>> set( Stuff "Foo;Bar;Baz" )
>>>
>>> Is this correct?
>>>
>>
>> Yes, this is identical to
>> set( Stuff Foo;Bar;Baz )
>> and also to set( Stuff  Foo Bar Baz )
>>
>>
> Actually set(var "a;b;c") with the double quotes will create a string with
> literal ;'s in it...


I thought quotes were used to force whatever is inside of it to be treated
as a single parameter. So for example, if I had a function called DoStuff,
you could call it 2 ways:

DoStuff( a b c )
DoStuff( "a b c" )

My understanding is that the first one will send 3 parameters to DoStuff.
The second will send only 1 parameter that is a list of 3 items.

Also, what if I do this:

set( Stuff foo bar;baz )

What will happen here?
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to