<div class="gmail_quote">On Mon, Feb 20, 2012 at 10:42 AM, Eric Noulard <span dir="ltr">&lt;<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/2/20 Andrea Crotti &lt;<a href="mailto:andrea.crotti.0@gmail.com">andrea.crotti.0@gmail.com</a>&gt;:<br>
<div><div class="h5">&gt; On 02/20/2012 03:15 PM, David Cole wrote:<br>
&gt;<br>
&gt;<br>
&gt; Use:<br>
&gt;<br>
&gt;   COMMAND ls -l<br>
&gt;<br>
&gt; Not:<br>
&gt;<br>
&gt;   COMMAND &quot;ls -l&quot;<br>
&gt;<br>
&gt;<br>
&gt; Yes thanks, I started using the &quot;&quot; because I noticed that sometimes they are<br>
&gt; needed.<br>
&gt; So suppose I want to split the options and the command, this:<br>
&gt;<br>
&gt; set(myoptions one two three)<br>
&gt; set(mycmd ls -l)<br>
&gt;<br>
&gt; message(${mycmd} ${myoptions})<br>
&gt;<br>
&gt; will produce<br>
&gt; ls-lonetwothree<br>
&gt;<br>
&gt; Which is not what I want, but with &quot; I get even a more strange result:<br>
&gt; message(&quot;${mycmd} ${myoptions}&quot;)<br>
&gt;<br>
&gt; ls;-l one;two;three<br>
&gt;<br>
&gt; and in the list command I don&#39;t see any way to simply concatenate two lists,<br>
&gt; so how should I merge two different lists to produce a command?<br>
<br>
</div></div>You may avoid to create a list in the first place:<br>
set(myoptions &quot;one two three&quot;)<br>
instead of<br>
set(myoptions one two three)<br>
<br>
see<br>
cmake --help-command list<br>
<br>
or you can<br>
string(REPLACE &quot;;&quot; &quot; &quot; stringopts &quot;${myoptions}&quot;)<br>
message(STATUS &quot;${stringopts}&quot;)<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
Erk<br>
Membre de l&#39;April - « promouvoir et défendre le logiciel libre » -<br>
<a href="http://www.april.org" target="_blank">http://www.april.org</a><br>
</div></div></blockquote></div><br><div><br></div><div>If you have:</div><div><br></div><div>  set(myoptions one two three)<br>  set(mycmd ls -l)<br></div><div><br></div><div>Then:</div><div><br></div><div>  COMMAND ${mycmd} ${myoptions}</div>
<div><br></div><div>should give you what you expect. (Regardless of what the &quot;message&quot; command&#39;s output is.)</div><div><br></div>