<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 02/20/2012 03:50 PM, David Cole wrote:
    <blockquote
cite="mid:CAAdwe9XgVYpi9wDSwGo+Hqd2d9ni4dDOzYwra-8Q4PjvoZRMQQ@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">On Mon, Feb 20, 2012 at 10:42 AM, Eric
        Noulard <span dir="ltr">&lt;<a moz-do-not-send="true"
            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 moz-do-not-send="true"
            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; &nbsp; COMMAND ls -l<br>
              &gt;<br>
              &gt; Not:<br>
              &gt;<br>
              &gt; &nbsp; COMMAND "ls -l"<br>
              &gt;<br>
              &gt;<br>
              &gt; Yes thanks, I started using the "" 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 " I get even a
              more strange result:<br>
              &gt; message("${mycmd} ${myoptions}")<br>
              &gt;<br>
              &gt; ls;-l one;two;three<br>
              &gt;<br>
              &gt; and in the list command I don'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 "one two three")<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 ";" " " stringopts "${myoptions}")<br>
          message(STATUS "${stringopts}")<br>
          <div class="HOEnZb">
            <div class="h5"><br>
              <br>
              --<br>
              Erk<br>
              Membre de l'April - &laquo; promouvoir et d&eacute;fendre le logiciel
              libre &raquo; -<br>
              <a moz-do-not-send="true" 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>&nbsp; set(myoptions one two three)<br>
        &nbsp; set(mycmd ls -l)<br>
      </div>
      <div><br>
      </div>
      <div>Then:</div>
      <div><br>
      </div>
      <div>&nbsp; COMMAND ${mycmd} ${myoptions}</div>
      <div><br>
      </div>
      <div>should give you what you expect. (Regardless of what the
        "message" command's output is.)</div>
      <div><br>
      </div>
    </blockquote>
    <br>
    <br>
    Ah yes you're probably right, I tried it and it works.<br>
    It would still be nice to understand how to pass generated lists to
    COMMAND, but that's a plus for<br>
    the moment, and apparently too hard to get right..<br>
  </body>
</html>