<div dir="ltr"><div><div>Hi James, <br><br></div>Within CTK we implemented a macro allowing to easily copy and compile files to the binary directory.<br>See <a href="https://github.com/commontk/CTK/blob/master/CMake/ctkMacroCompilePythonScript.cmake">https://github.com/commontk/CTK/blob/master/CMake/ctkMacroCompilePythonScript.cmake</a><br>

</div><div><br>Hth<br></div>Jc<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 29, 2013 at 4:50 PM, James Amundson <span dir="ltr">&lt;<a href="mailto:amundson@fnal.gov" target="_blank">amundson@fnal.gov</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have a mixed C++/Python project. The test suite includes executing python files through a wrapper script. For example,<br>
<br>
add_test(test_parallel_utils_<u></u>py ${SYNERGIA2_BINARY_DIR}/<u></u>synergia-local -c &quot;import nose; nose.main()&quot;<br>
    test_parallel_utils.py)<br>
<br>
<br>
One detail is important: the python file must exist in the binary directory. For reasons beyond my control, simply specifying the source directory as the location for test_parallel_utils.py won&#39;t work. For in-source builds, of course there is no problem -- the python file is already there.<br>


<br>
What is the best way to get the python file into the binary directory for out-of-source builds?<br>
<br>
Thanks for any advice,<br>
Jim Amundson<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" 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" target="_blank">http://www.cmake.org/Wiki/<u></u>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" target="_blank">http://cmake.org/cmake/help/<u></u>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/<u></u>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/<u></u>training.html</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>
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>
</blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br>
</div>