On Tue, Feb 14, 2017 at 08:23:58 -0500, Brad King wrote: > On 02/13/2017 10:00 AM, Giel van Schijndel wrote: >> I've written it as a reStructuredText document here [2]. >> [2]: >> https://gitlab.kitware.com/muggenhor/cmake/blob/ctest-alt-dir/Help/ctest_alt_dir.rst > > Thanks for the nice write-up!
Thanks for reading it, I'm glad that you appreciate it.
>> From the doc:
>> generate a relative path from the CTestTestfile.cmake to that target. Not an
>> absolute one.
>
> I don't recall whether CTest currently defines behavior for a relative path
> found in an add_test call within a CTestTestfile.cmake. We will need to
> check and define behavior as needed. Such a change would be something to
> do in a preparatory step.
I think it may be easier to do this inside CMake by generating the "new"
form of the add_test() command in the produced CTestTestfile.cmake. From
some experiments I've got the impression that that's always executed
with paths relative to the directory containing the CTestTestfile.cmake.
Although I only tested without setting the WORKING_DIRECTORY test
property, I'm not sure how or if that property could work in this
context.
>> SUBDIRS(${CTEST_OUTPUT_DIRECTORY})
>
> Yes, we'll need exactly one of these when at least one test used the
> CTEST_OUTPUT_DIRECTORY property. IIUC, tests without that property
> will just stay in the CMAKE_CURRENT_BINARY_DIR's CTestTestfile.
I covered the "exactly one" bit with this bit:
> ensuring no equivalent call is already present
As for tests without that property, it was indeed my intention to leave
them in the "default" (CMAKE_CURRENT_BINARY_DIR's) CTestTestfile.cmake.
--
Met vriendelijke groet,
With kind regards,
Giel van Schijndel
--
"I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out how
to use my telephone."
-- Bjarne Stroustrup
signature.asc
Description: PGP signature
-- 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-developers
