[CMake] Copy target from different configurations

Tyler Roscoe tyler at cryptio.net
Fri May 29 12:27:48 EDT 2009


On Thu, May 28, 2009 at 04:02:35PM -0700, Daniel Tavares wrote:
> I'm trying to add a post build event using add_custom_command that will
> copy the target executable to a different directory, but I can't get the
> correct location of the executable created at build time, because it
> changes depending on the configuration being built.

This has been discussed a lot recently. Maybe it's time for a FAQ entry
or, even better, an enhancement to CMake so that we can specify
custom_commands and custom_targets by BUILD_TYPE?

A possible workaround from David Cole:
http://www.cmake.org/pipermail/cmake/2009-May/029618.html

Another approach from James Bigler:
http://www.cmake.org/pipermail/cmake/2009-May/029526.html

Clinton Stimpson replies to my thread on this topic, though his solution
might not help your case:
http://www.cmake.org/pipermail/cmake/2009-May/029476.html

tyler


More information about the CMake mailing list