[CMake] Proper way to define a list

Bill Hoffman bill.hoffman at kitware.com
Mon Mar 30 15:41:32 EDT 2009


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...

-Bill


More information about the CMake mailing list