[cmake-developers] non-default executables (was: akademy summary)

Alexander Neundorf neundorf at kde.org
Mon Oct 2 11:25:02 EDT 2006

On Monday 02 October 2006 17:21, Brad King wrote:
> Alexander Neundorf wrote:
> > There were also some wishes:
> [snip]
> > 3) provide a target to build the tests, and don't build the test binaries
> > by default without having to adjust a cmake option
> >
> > I'll have a look whether this is possible with the current feature set of
> > CMake, I already talked with Bill about it.
> If the executables are test-specific then they should be created in
> tests driven by ctest --build-and-test.  However if there is a whole set
> of tests that use one target you could consider making them first-class
> targets that are not built by default.
> I've added a NOT_IN_ALL option for ADD_LIBRARY and ADD_EXECUTABLE.  This
> should let you do it:
> ADD_CUSTOM_TARGET(test_executables)
> ADD_DEPENDENCIES(test_executables myTestExe)
> There is no way to make the "test" target depend on this though because
> it is not a first-class target during the CMake configure stage.  Fixing

Sounds good :-)
I'll try ASAP.

Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net

More information about the cmake-developers mailing list