[Cmake] CMake tests

Brad King brad.king at kitware.com
Tue May 14 09:39:38 EDT 2002


> In fixing the dependency analysis bug, I added some more tests. In
> particular, the Dependency test now contains four executables. I've
> added four tests, each one of which runs a single executable. However,
> I notice that the build process builds all four each time. Since the
> only time these tests will fail is at link time, the net effect is
> that the same set of tests are being run four times. Is there a better
> way to specify the tests?

The cmaketest program will build the whole project in the directory of the
test and then run one program.  If you want to run more than one
executable, you could write a wrapper executable that doesn't link to
anything, but runs the other executables.  If you don't really need to run
the other executable since the test is just about linking, then you really
need only one ADD_TEST.

-Brad




More information about the CMake mailing list