[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Best way to copy Python test file to binary directory?
From:       Jean-Christophe Fillion-Robin <jchris.fillionr () kitware ! com>
Date:       2013-10-29 21:00:26
Message-ID: CANLz8R6LTJ5_68T6TGQOzZAa1nH_8-cB3b8kwcz551Xor-h+rA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi James,

Within CTK we implemented a macro allowing to easily copy and compile files
to the binary directory.
See
https://github.com/commontk/CTK/blob/master/CMake/ctkMacroCompilePythonScript.cmake

Hth
Jc


On Tue, Oct 29, 2013 at 4:50 PM, James Amundson <amundson@fnal.gov> wrote:

> Hi,
> 
> I have a mixed C++/Python project. The test suite includes executing
> python files through a wrapper script. For example,
> 
> add_test(test_parallel_utils_**py ${SYNERGIA2_BINARY_DIR}/**synergia-local
> -c "import nose; nose.main()"
> test_parallel_utils.py)
> 
> 
> 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't work. For
> in-source builds, of course there is no problem -- the python file is
> already there.
> 
> What is the best way to get the python file into the binary directory for
> out-of-source builds?
> 
> Thanks for any advice,
> Jim Amundson
> --
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
> 
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/**support.html<http://cmake.org/cmake/help/support.html>
>  CMake Consulting: \
> http://cmake.org/cmake/help/**consulting.html<http://cmake.org/cmake/help/consulting.html>
>  CMake Training Courses: \
> http://cmake.org/cmake/help/**training.html<http://cmake.org/cmake/help/training.html>
>  
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>  



-- 
+1 919 869 8849


[Attachment #5 (text/html)]

<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.cm \
ake">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>



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic