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 <[email protected]> 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.
>
>
>
>
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to