[cmake-developers] #16633: make CTestTestfile.cmake output dir possible to control
Giel van Schijndel
giel at mortis.eu
Tue Feb 14 10:54:36 EST 2017
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20170214/750cb30c/attachment.sig>
More information about the cmake-developers
mailing list