You are not using full paths as the args to configure_file...<br><br>Why not just this?<br><br>configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/blessed.txt ${CMAKE_CURRENT_BINARY_DIR}/blessed.txt COPY_FILE )<br><br><br><div class="gmail_quote">
On Wed, Oct 21, 2009 at 9:59 PM, James C. Sutherland <span dir="ltr">&lt;<a href="mailto:James.Sutherland@utah.edu">James.Sutherland@utah.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="">I am using configure_file to copy files during the build process.  I have a nested directory structure, that can be represented as:<blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;">
/rootdir<br>  CMakeLists.txt<br>  /test<br>     CMakeLists.txt</blockquote><div><div><br></div><div>When processing rootdir/test/CMakeLists.txt, I have the following:</div><blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;">
#---------------------------</blockquote><blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;">get_filename_component( dir ${CMAKE_CURRENT_LIST_FILE} PATH )<br>configure_file( ${dir}/blessed.txt blessed.txt COPY_FILE )</blockquote>
<blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;">#---------------------------</blockquote><br><div>The intention is to copy the file &quot;blessed.txt&quot; from the source tree to the build tree prior to running a regression test.</div>
<div><br></div><div>On Mac, this works as I intend it to.  The file &quot;blessed.txt&quot; is copied to the &quot;test&quot; subdirectory in the build tree.</div><div><br></div><div>On Linux, &quot;blessed.txt&quot; is copied to the top-level directory in the build tree, NOT to the &quot;test&quot; subdirectory.</div>
<div><br></div><div>Is this a bug, or am I doing something wrong?</div><div><br></div><font color="#888888"><div>James</div></font></div></div><br>_______________________________________________<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></blockquote></div><br>