[CMake] create same executable under 2 different names

Crni Gorac cgorac at gmail.com
Fri Apr 18 13:21:36 EDT 2008


On Fri, Apr 18, 2008 at 7:13 PM, Hendrik Sattler
<post at hendrik-sattler.de> wrote:
> Crni Gorac schrieb:
>
> > Is above possible with CMake?  I'd like to employ standard Unix trick
> > with my program - to appear under 2 names, and then to inspect argv[0]
> > and adjust its behavior accordingly.  It's development helper kind of
> > program, thus not installed, so I cannot use symlink-ing for that
> > purpose.  On the other side, if I create two executables using
> > ADD_EXECUTABLE() for each one, the source gets compiled twice...
> >
> >
>  How about adding a post-build custom copy command?
>  It is usually better to write a smaller wrapper for such things, though
> (smaller).

Excellent - exactly what I needed.  Many thanks!


More information about the CMake mailing list