Hi Erk,

And now, of course, there's the catch. Things work great for my toy
project with only one test program. But my real project has more than
one test program. How should I now create the custom target 'check'? Do
I need to keep a list of all test programs? That would be quite
cumbersome, because my code tree looks something like this.

project-root
  dir1
    src
    test
  dir2
    dir3
      src
      test
    dir4
      src
      test

Calling 'make check' should then compile, link and run the test programs
in all the different test directories.

Best regards,
Marcel Loose.


On Fri, 2009-03-20 at 10:34 +0100, Marcel Loose wrote:
> Hi Erk,
> 
> Thanks for your prompt reply. Your example works great.
> In the mean time, I found another way to solve my problem:
> 
> add_custom_target(check DEPENDS t_hello)
> add_custom_command(TARGET t_hello POST_BUILD
>   COMMAND ${CMAKE_CTEST_COMMAND} t_hello)
> 
> But I think I prefer your solution; it saves an extra
> add_custom_target() statement.
> 


_______________________________________________
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

Reply via email to