[CMake] Make Nightly build tests.
Björn Piltz
bjornpiltz at googlemail.com
Sun Jul 25 07:26:57 EDT 2010
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