[CMake] make test

Alexander Neundorf a.neundorf-work at gmx.net
Fri Mar 28 17:31:16 EDT 2008


On Friday 28 March 2008, Alan W. Irwin wrote:
> On 2008-03-28 20:59+0100 Alexander Neundorf wrote:
...
> > Then it's also more obvious that it doesn't depend on all
>
> I am probably missing something because I don't understand this comment.

I meant: if somebody runs a tool different from make, he maybe doesn't expect 
that it will automatically build all targets so that they are current.

> All of the PLplot tests depend on libraries and test examples being built
> in the build tree, and I would think that would be true of most other
> projects. Thus, if you have failed to run "make all" before running ctest
> by hand you will get an error (if you are starting with a clean build tree)
> or potentially out-of-date tests (which is more serious since the effect is
> more subtle) if you are working with an existing build.  In fact, if the
> CMake developers agree to implement "test" depending on "all", this would
> be a motivation for using "make test" rather than running the ctest command
> by hand.

I think simply having test depend on all may be a bit slow.
It might be better if the specific tests would depend on the according 
targets.

> Alex, is your concern that "all" is too comprehensive a dependency?  In
> that case, you could change ADD_TEST to allow setting specific dependencies
> that would be honored by "make test", but that might be overkill.

I also would like if the targets would be current on "make test". Last summer 
I discussed with Brad about that and it isn't as easy as it may seem. (e.g. 
it would also be nice if targets which are OPTIONAL would be automatically 
built if the test which uses them is executed).

Alex


More information about the CMake mailing list