[cmake-developers] Fwd: Chaining custom commands in VS 2010

James Bigler jamesbigler at gmail.com
Wed Dec 5 14:42:35 EST 2012


I just thought of another potential work around.  I tried changing the
source1.obj + source2.obj -> temp.obj custom command into a PRE_LINK custom
command knowing that it is probably safe to always generate temp.obj even
if its dependencies don't change (i.e. another object file gets compiled
requiring a relink).  Unfortunately in my test app, the PRE_LINK event
isn't triggered for some reason.  I've tried building a SHARED and STATIC
library with no success.  I've even tried PRE_BUILD (though I know that
won't work the right way, it still didn't run the command).

Any reason why PRE_LINK custom target wouldn't be run?  I see it in the
property pages under Build Events->Pre-Link Event.

James


On Wed, Dec 5, 2012 at 4:03 AM, David Cole <david.cole at kitware.com> wrote:

> As a workaround, you could try isolating the "generating obj" and
> "combining obj" commands into their own respective custom targets, and then
> making the target dependencies specify the ordering. That might kick the
> VS10 dependency analysis enough to make it work. Not ideal, but not too
> hard to try either.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20121205/7138adc1/attachment.html>


More information about the cmake-developers mailing list