On Thu, Aug 11, 2011 at 4:31 PM, Alan W. Irwin <span dir="ltr">&lt;<a href="mailto:irwin@beluga.phys.uvic.ca">irwin@beluga.phys.uvic.ca</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 2011-08-11 20:34+0200 Michael Wild wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 08/11/2011 07:39 PM, Alan W. Irwin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2011-08-11 17:20+0200 Michael Wild wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How about<br>
<br>
string(APPEND &quot; /newstuff&quot; xyz)<br>
<br>
It is not satisfactory in that it doesn&#39;t follow the semantics of all<br>
the other string(...) commands which never modify their input.<br>
</blockquote>
<br>
I like that idea, but I would generalize it as<br>
<br>
string(APPEND &lt;string&gt; &lt;output_variable&gt; &lt;input&gt; [&lt;input&gt;...])<br>
<br>
to make it similar to other string commands.<br>
<br>
BUT if no input is given take it from &quot;${output_variable}&quot; just as<br>
for your suggestion.<br>
<br>
I would also make that same change for all other string commands of<br>
the same form, i.e., the various REGEX and REPLACE commands.  For those, I<br>
find the input string is often &quot;${output_variable}&quot; so I believe this<br>
generalization would be a useful convenience for all users of those<br>
string subcommands.  Furthermore, even though this generalization of<br>
REGEX et all is a major change, IIRC you get a wrong number<br>
of arguments now for, e.g.,<br>
<br>
string(REGEX REPLACE &lt;regular_expression&gt; &lt;replace_expression&gt; &lt;output<br>
variable&gt;)<br>
<br>
so I believe this generalization would be backwards compatible.<br>
<br>
Alan<br>
</blockquote>
<br></div>
Making the &lt;string&gt; argument optional is not possible....<br>
</blockquote>
<br>
Please reread what I wrote above.  &lt;string&gt; is not optional.<br>
It is &lt;input&gt; that would be optional.  And similarly for<br>
REGEX and friends.<div class="im"><br>
<br>
Alan<br>
__________________________<br>
Alan W. Irwin<br>
<br>
Astronomical research affiliation with Department of Physics and Astronomy,<br>
University of Victoria (<a href="http://astrowww.phys.uvic.ca" target="_blank">astrowww.phys.uvic.ca</a>).<br>
<br>
Programming affiliations with the FreeEOS equation-of-state implementation<br>
for stellar interiors (<a href="http://freeeos.sf.net" target="_blank">freeeos.sf.net</a>); PLplot scientific plotting software<br>
package (<a href="http://plplot.org" target="_blank">plplot.org</a>); the libLASi project (<a href="http://unifont.org/lasi" target="_blank">unifont.org/lasi</a>); the Loads of<br>
Linux Links project (<a href="http://loll.sf.net" target="_blank">loll.sf.net</a>); and the Linux Brochure Project<br>
(<a href="http://lbproject.sf.net" target="_blank">lbproject.sf.net</a>).<br>
__________________________<br>
<br>
Linux-powered Science<br>
__________________________<br>
______________________________<u></u>_________________<br></div><div><div></div><div class="h5">
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</div></div></blockquote></div><br><div><br></div><div>I share Alex&#39;s confusion with your proposed signature. All other string subcommands refer to either &quot;&lt;string&gt;&quot; or &quot;&lt;input&gt;&quot; in their args list. None of them have both &quot;&lt;string&gt;&quot; *and* &quot;&lt;input&gt;&quot;.</div>
<div><br></div><div>If we did have one, it would blend best with a signature like:</div><div><br></div><div>  string(CONCAT &quot; /newStuff&quot; variable)</div><div><br></div><div>Although, I like CONCAT better than APPEND, .... I still contend that the best option so far is still to do nothing.</div>
<div><br></div>