[CMake] Proposal: variant of create_test_sourcelist using sym- or hard-links

Jed Brown jed at 59A2.org
Thu Apr 30 13:52:55 EDT 2009


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090430/90ef0e3f/attachment.pgp>


More information about the CMake mailing list