[CMake] Something like CTEST_CUSTOM_PRE_TEST, but for individual projects?

Dan Kegel dank at kegel.com
Mon Sep 15 23:00:19 EDT 2014


Well, foo.  Turns out CTEST_CUSTOM_PRE_TEST behaves differently than I expected.
If you run ctest in a subdirectory, CTestCustom.cmake isn't executed.
So the top-level one isn't inherited by the subdirectories, as it were.

Are we supposed to have a copy of CTestCustom.cmake in each project?
Which ones get run when?

On Fri, Sep 12, 2014 at 1:34 PM, Dan Kegel <dank at kegel.com> wrote:
> I'm porting a large project with many subdirectories from autotools to
> cmake and ctest.
> It's going well, but I ran into a question on how to do test setup/teardown.
> I've got CTEST_CUSTOM_PRE_TEST working nicely, but now I need different
> conditions for each directory's worth of tests.  Is there anything like
> CTEST_CUSTOM_PRE_TEST that gets run at the beginning of each subprojects'
> tests?


More information about the CMake mailing list