[CMake] make test

Alexander Neundorf a.neundorf-work at gmx.net
Fri Mar 14 16:30:09 EDT 2008


On Friday 14 March 2008, Alan W. Irwin wrote:
> On 2008-03-13 21:18-0400 David Cole wrote:
> > For it to work, there has to be an "ENABLE_TESTING()" in the top level
> > CMakeLists.txt file. And at least one ADD_TEST somewhere in the tree...
> > "make test" should be equivalent to running "ctest" in the top level
> > binary directory. (Or any sub-directory for that matter.)
>
> Your reply and Rodolfo's subsequent success story inspired me to try and
> find out why "make test" has always given zero results for PLplot while
> ctest works fine.

ctest is also more powerful, you can select which tests you want to run. So I 
usually recommend using ctest instead of "make test".

...
> Another concern with the current "make test" is it does not depend on the
> default "all" target.  That is a bad oversight IMO, since the current
> situation is you will be running out-of-date tests after some code fixup
> unless you remember to run "make" before "make test".

...or if the targets haven't been built yet, it just fails.
We talked about that last year, but I can't remember the details.

Alex


More information about the CMake mailing list