I thought there was no explicit string syntax in CMake. After all, you can do this:<div><br></div><div>message( Hello )</div><div><br></div><div>using no quotes.</div><div><br></div><div>Suppose I have a list of files:</div>
<div><br></div><div>C:\file 1.txt</div><div>C:\file 2.txt</div><div><br></div><div>Notice the space in each one.</div><div><br></div><div>If I wanted to create a list of these files. I would naturally do:</div><div><br></div>
<div>set( filelist C:\file 1.txt;C:\file 2.txt )</div><div><br></div><div>See the confusion? There&#39;s spaces (with unintended meaning to set() ) mixed with semi-colons. What would one do in this example?<br><br><div class="gmail_quote">
On Mon, Mar 30, 2009 at 3:09 PM, BRM <span dir="ltr">&lt;<a href="mailto:bm_witness@yahoo.com">bm_witness@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>That&#39;s correct - it is 1 parameter versus 3, but for a different reason.<br><br><div>DoStuff( a b c )<br><br>Processes each as 3 different variables to be passed, each of type and value a, b, and c respectively.<br>
<br></div><div>DoStuff( &quot;a b c&quot; )</div><br>Processes it as 1 variable - a string containing the value &quot;a b c&quot;.<br><br>If you have the string<br><br><div>DoStuff( &quot;a;b;c&quot; )<br><br>Then that variable will be of the value &quot;a;b;c&quot; with literal semi-colons in it. I believe that was Bill&#39;s point.<br>
</div><br>Ben<br></div><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><br><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><font size="2" face="Tahoma"><hr size="1">
<b><span style="font-weight:bold">From:</span></b> Robert
 Dailey &lt;<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@gmail.com</a>&gt;<br><b><span style="font-weight:bold">To:</span></b> Bill Hoffman &lt;<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>&gt;<br>
<b><span style="font-weight:bold">Cc:</span></b> <a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a>; <a href="mailto:a.neundorf-work@gmx.net" target="_blank">a.neundorf-work@gmx.net</a><br><b><span style="font-weight:bold">Sent:</span></b> Monday, March 30, 2009 3:47:15 PM<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [CMake] Proper way to define a list<br></font><div><div></div><div class="h5"><br>
<div class="gmail_quote">On Mon, Mar 30, 2009 at 2:41 PM, Bill Hoffman <span dir="ltr">&lt;<a rel="nofollow" href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">

<div>Alexander Neundorf wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
On Monday 30 March 2009, Robert Dailey wrote:<br>
<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Hi,<br>
What&#39;s the proper way to define a list? Suppose I have 3 words: Foo, Bar,<br>
and Baz. I want these 3 strings to be in a list called Stuff. Would I do<br>
this:<br>
<br>
set( Stuff &quot;Foo;Bar;Baz&quot; )<br>
<br>
Is this correct? <br>
</blockquote>
<br>
Yes, this is identical to<br>
set( Stuff Foo;Bar;Baz )<br>
and also to set( Stuff  Foo Bar Baz )<br>
<br>
</blockquote>
<br></div>
Actually set(var &quot;a;b;c&quot;) with the double quotes will create a string with literal ;&#39;s in it...</blockquote><div><br></div><div>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:</div>

<div><br></div><div>DoStuff( a b c )</div><div>DoStuff( &quot;a b c&quot; )</div><div><br></div><div>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.</div>

<div><br></div><div>Also, what if I do this:</div><div><br></div><div>set( Stuff foo bar;baz )</div><div><br></div><div>What will happen here? </div></div>
</div></div></div></div></div></div></blockquote></div><br></div>