[CMake] RUN_TESTS project & dependencies
Marcel Loose
loose at astron.nl
Tue Mar 24 04:28:54 EDT 2009
On Mon, 2009-03-23 at 11:25 -0500, Robert Dailey wrote:
> On Fri, Mar 20, 2009 at 9:33 AM, Marcel Loose <loose at astron.nl> wrote:
> Hi Robert,
>
> I am planning to use (but haven't implemented and tried yet):
>
> - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
> to define a custom 'check' target (as with GNU Autotools)
>
> - add_executable(<testprog> EXCLUDE_FROM_ALL ...)
> for each test program
>
> - add_dependencies(check <testprog>)
> for each <testprog> you want to be compiled, linked and run
>
> Hope it helps.
>
>
> I actually am running into a problem with this. When I run my tests,
> it says they have all failed, as if there is a boolean issue
> somewhere. Also, I can't seem to find out how the visual studio
> project "check" runs the tests. I looked in post build events, but I
> see nothing. Where and how is it evoking the tests? When I look at the
> post build events in Visual Studio 2008 for the RUN_TESTS project, the
> command to execute the tests is in the post build event section.
Hi Robert,
I'm using Linux, so I don't know if the above solution will work with
Visual Studio. I simply type 'make check' on the command line and my
tests get compiled, linked and run.
Best regards,
Marcel Loose.
More information about the CMake
mailing list