For executables that are strictly tests (i.e. will never be invoked
directly by the user) there is no problem with calling the executable as

  CommonTests testname args ...

because the user/developer never needs to see this.  When the executable
is also a utility or will be run manually for other reasons like
profiling, it is not as nice.  To reduce executable size when multiple
programs have closely related functionality, it is common to use the
executable name to determine behavior (cf. Busybox, TeX, Git, Open MPI's
wrappers, Vim).  It would be convenient, especially when building with
static libs, to have this option in create_test_sourcelist (or something
similar) to avoid linking many small programs, while retaining the
convenient interface of separate executables.

This would be a trivial modification to create_test_sourcelist, just
dispatch on argv[0] instead of argv[1], and create the links.

Jed

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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