<div dir="ltr">list(APPEND) requires at least one element argument, right?<div><br></div><div>Can you require the same thing for string(APPEND)?  That would make it symmetric and remove your edge case.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 6, 2015 at 2:47 PM, Daniel Pfeifer <span dir="ltr"><<a href="mailto:daniel@pfeifer-mail.de" target="_blank">daniel@pfeifer-mail.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jul 6, 2015 at 8:41 PM, Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:<br>
> On 07/04/2015 06:27 PM, Daniel Pfeifer wrote:<br>
>> Attached is a patch that adds a subcommand string(APPEND).<br>
>> This allows to write<br>
>><br>
>>> string(APPEND string_variable "some string")<br>
>><br>
>> instead of<br>
>><br>
>>> set(string_variable "${string_variable}some string")<br>
><br>
> Thanks.  Please extend the first patch to also add explicit coverage<br>
> of the feature in the test suite, perhaps in Tests/RunCMake/string<br>
> similar to the Concat test case.  I'd prefer to get the implementation,<br>
> documentation, and tests of the new command integrated and working<br>
> before considering use of the command everywhere else.<br>
<br>
</span>OK, now with tests and release notes.<br>
<br>
There is a debatable edge case:<br>
When a variable is not-set and zero elements are appended, do we<br>
expect the result to be a) not-set or b) an empty string?<br>
My current implementation considers appending zero elements a no-op,<br>
i.e. it follows approach a).<br>
<br>
cheers, Daniel<br>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake-developers</a><br></blockquote></div><br></div>