See also the details in this thread:<br><a href="http://www.cmake.org/pipermail/cmake/2007-May/014222.html">http://www.cmake.org/pipermail/cmake/2007-May/014222.html</a><br><br>...which describes how to iterate a text file line by line using &quot;FILE(READ&quot;, converting to a list preserving existing semi-colons, and iterating the lines with cmake FOREACH...
<br><br>HTH,<br>David<br><br><div><span class="gmail_quote">On 7/22/07, <b class="gmail_sendername">Brandon Van Every</b> &lt;<a href="mailto:bvanevery@gmail.com">bvanevery@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 7/22/07, Mathieu Malaterre &lt;<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>&gt; wrote:<br>&gt; Hi Brandon,<br>&gt;<br>&gt;&nbsp;&nbsp; I think you can use this trick to work around your issue:<br>
&gt;<br>&gt; <a href="http://www.cmake.org/pipermail/cmake/2007-May/014317.html">http://www.cmake.org/pipermail/cmake/2007-May/014317.html</a><br>&gt;<br>&gt;&nbsp;&nbsp; STRING(REGEX REPLACE &quot;\r?\n&quot; &quot;;&quot; ENT &quot;${input}&quot;)
<br>&gt;&nbsp;&nbsp; FOREACH(line ${ENT})<br>&gt;&nbsp;&nbsp; # do the match on each line<br><br>Thanks for the cross-platform \r\n CR+LF hint.&nbsp;&nbsp;Last night I tried to<br>match \n, but it didn&#39;t seem to be working.&nbsp;&nbsp;Actually it was matching
<br>fine, but my output only had \n in it, and a Windows shell needs CR+LF<br>to go down a line.<br><br>Injecting semicolons is really dangerous though.&nbsp;&nbsp;What if your file<br>already has semicolons?&nbsp;&nbsp;In my code, FILE(...) followed by
<br>STRING(REGEX ...) is destroying the semicolons in the file.&nbsp;&nbsp;I need to<br>get to the bottom of that.<br><br><br>Cheers,<br>Brandon Van Every<br>_______________________________________________<br>CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>