On Wed, Aug 25, 2010 at 11:11 AM, Eric Noulard <eric.noul...@gmail.com>wrote:

> 2010/8/25 David Cole <david.c...@kitware.com>:
> > Show us your "add_test" call.
> > If it's a python script, execute the python interpreter and pass the
> script
> > as an arg:
> > add_test(${PYTHON_EXECUTABLE} "/full/path/to/script.py")
>
> I think you mean
>
> add_test(TestName ${PYTHON_EXECUTABLE} "/full/path/to/script.py")
>

Yes, of course. I was too hasty on that reply... Thanks for the correction.
:-)



> Another solution I'm currently using on Linux
> (don't know how it work on Windows) is to add
> this as the very first line of your script:
>
> #!/usr/bin/env python
>
> + making the script executable.
>
> Then
> add_test(TestName "/full/path/to/script.py")
> should work as well without trouble.
>
> David's solution should work on Windows too as soon as you
> find_package(PythonInterp)
>
> see
> http://docs.python.org/tutorial/interpreter.html#executable-python-scripts
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
>
_______________________________________________
Powered by www.kitware.com

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

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

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

Reply via email to