[CMake] Is it possible to run ctest outside build tree?

Eric Noulard eric.noulard at gmail.com
Fri Mar 24 15:11:14 EDT 2017


Hi David,
Thank you for you for checking the code. Would you think adding such a
command line option would be acceptable upstream?

Le 24 mars 2017 18:43, "David Cole" <DLRdave at aol.com> a écrit :

This code:

https://github.com/Kitware/CMake/blob/master/Source/ctest.cxx#L139-L157

shows ctest will look for a CTestTestfile.cmake or DartTestfile.txt
file in the current working directory as soon as it starts. Except in
the case of processing a "--launch" directive, in which case, it
dispatches that in the code just above there.

So. I think you have not much choice other than to propose adding a
new command line argument for such purpose, or wrapping existing ctest
with your own script or program of some sort.


HTH,
David C.




On Fri, Mar 24, 2017 at 6:04 AM, Eric Noulard <eric.noulard at gmail.com>
wrote:
> Is possible to run ctest outside the builld tree and how?
> typical use is when I have an out of source build I may be in the source
> tree
> and want to run tests without manually going to build tree.
>
> i.e. I currently do:
>
> ninja -C /my/build/tree
>
> is there a similar way to do that with ctest (other than creating my own
> script, shell alias etc...)?
>
> --
> Eric
>
> --
>
> 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://public.kitware.com/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170324/4592f4f7/attachment-0001.html>


More information about the CMake mailing list