[CMake] How can one use ctest/cdash with a target that is not "all"?

JR Cary cary at txcorp.com
Sat Jan 11 08:45:38 EST 2014


How can one use ctest/cdash with a target that is not "all"?

I have a project with two top-level targets, say "all" and "other", where
"make all" does a standard build of executables that one can test, while
"make other" does a distinct set of actions, in particular not
creating any executables, so one can test only the build.  I would
like these separately tested and to show up separately on the dashboard.

The two builds get different names by configuring in two separate
directories, with different values of BUILDNAME, e.g., foo-all
and foo-other.  Configuring in two separate directories is also done
to be able to specify different values of CMAKE_INSTALL_PREFIX.

To test the "all" build, I do the usual

   make ExperimentalStart ExperimentalBuild ExperimentalTest 
ExperimentalSubmit

but for the "other" build, is there an easy way to do something like

   make ExperimentalStart ExperimentalBuild-other ExperimentalSubmit-other,

where "make ExperimentalBuild-other" executes "make other" instead of
"make all" while producing all the files needed for submission?
And then ExperimentalSubmit-other does not redo "make all"?

Thanks.....John Cary


More information about the CMake mailing list