[CMake] Make Nightly build tests.

Björn Piltz bjornpiltz at googlemail.com
Tue Jul 27 13:31:30 EDT 2010


I'm bumping this, since no one replied.

This issue has already been discussed at length
here http://www.cmake.org/pipermail/cmake/2009-March/027929.html
and here http://www.cmake.org/pipermail/cmake/2009-March/027887.html

There is also a similar feature request:
http://www.cmake.org/Bug/view.php?id=8774

Right now I'd settle on any kind of workaround...

>
> Hi all,
> I'm quoting my question here:
> http://stackoverflow.com/questions/3290280/cmake-and-ctest-how-to-make-target-nightly-actually-build-the-tests
>
> It's a well known problem that executing make "test" doesn't build the
> tests as discussed here. As suggested, the problem can be partly
> solved with the artificial target "check". I want to know how I can
> force building of tests when i call "make Nightly".
>
> What I've done so far:
>
>   add_custom_target(buildtests)
>   add_custom_target(check COMMAND "ctest")
>   add_dependencies(check buildtests)
>   add_dependencies(Nightly buildtests)
>
>   add_dependencies(buildtests Test1)
>   ...
>   add_dependencies(buildtests TestN)
>
> Now "make check" builds an runs the tests, but "make Nightly"
>
> builds the tests
> updates the repo to CTEST_NIGHTLY_START_TIME
> builds all other targets
> runs the (now outdated) tests
>
> I'd be greatful for any suggestions!


More information about the CMake mailing list