What I did (and solved the issue) is:<br> file(READ &quot;zconf.in.h&quot; ZCONF_H)<br>STRING(REPLACE &quot;HAVE_STD_HEADERS_H&quot; ${HAVE_STD_HEADERS_H} &quot;${ZCONF_H}&quot;)<br>file(WRITE &quot;zconf.test&quot; &quot;${ZCONF_H}&quot;)<br>

<br>Especially the quotes around the variable are important as otherwise CMake think it&#39;s an array and not a string... I think :)<br><br><br><br><br><div class="gmail_quote">2009/3/25 David Cole <span dir="ltr">&lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&quot;;&quot; is the CMake list element separator character. The &quot;;&quot; are still there in the variable, you probably just can&#39;t see them with your processing code that comes after reading in the file...<br>

<br>
<div>You can replace semi-colons like this with escaped semi-colons:</div><div><div>  STRING(REGEX REPLACE &quot;;&quot; &quot;\\\\;&quot; ZCONF_H &quot;${ZCONF_H}&quot;)</div><div><br></div><div>Then CMake will treat the variable ZCONF_H as one large string that has embedded (escaped) semi-colons in it.</div>


<div><br></div><div><br></div><div>HTH,</div><div>David</div><font color="#888888"><div><br></div><div><br></div></font></div><div><div class="gmail_quote"><div><div></div><div class="h5">On Sun, Mar 22, 2009 at 6:07 AM, Steven Van Ingelgem <span dir="ltr">&lt;<a href="mailto:steven@vaningelgem.be" target="_blank">steven@vaningelgem.be</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Hi,<br><br><br>I&#39;m trying to read in a C-header file with &quot;file(READ)&quot;:<br>

  file(READ &quot;zconf.in.h&quot; ZCONF_H)<br>
<br>!! But this variable contains no &quot;;&quot; whatsoever?<br><br>How can I ask to read it in completely?<br>

<br><br>Thanks,<br><font color="#888888">Steven<br>
</font><br></div></div><div class="im">_______________________________________________<br>
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/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/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/listinfo/cmake</a><br></div></blockquote></div><br></div>
</blockquote></div><br>