On Mon, Apr 26, 2010 at 20:56, Alexander Neundorf <a.neundorf-w...@gmx.net> wrote: > On Friday 23 April 2010, Magnus Therning wrote: >> 2010/4/23 Adolfo Rodríguez Tsouroukdissian > <adolfo.rodrig...@pal-robotics.com>: >> > On Fri, Apr 23, 2010 at 5:56 PM, Magnus Therning <mag...@therning.org> >> > >> > wrote: >> >> On Fri, Apr 23, 2010 at 16:35, Tyler Roscoe <ty...@cryptio.net> wrote: >> >> > On Fri, Apr 23, 2010 at 04:24:06PM +0100, Magnus Therning wrote: >> >> >> A project that I'm currently trying to convert over to CMake has >> >> >> several unit tests written as standalone executables. Are there any >> >> >> examples around for integrating the running of such tests as part of >> >> >> the build in CMake? >> >> > >> >> > add_test just takes a command line. You can put whatever you want in >> >> > there and ctest will run it for you. >> >> > >> >> > http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test >> >> >> >> Ah, yes, that comes closer to what I want. Thanks. Now I only want >> >> the test's stdout to be connected to the stdout so I can see the >> >> results immediately >> > >> > Run ctest with the -V or -VV option >> >> Hmm, how do I get that passed to ctest when I run 'make test'? > > Don't run "make test", but run ctest directly (that's also what "make test" > does). You have a lot more options available when running ctest directly, > it's worth it :-)
Except of course that it will take away one of the things I *really* want, which is that all unit tests are run every time I compile. It seems at the moment I'll have to write a stand-alone script to get that behaviour :-( /M -- Magnus Therning (OpenPGP: 0xAB4DFBA4) magnus@therning.org Jabber: magnus@therning.org http://therning.org/magnus identi.ca|twitter: magthe _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake