Hi Andreas.<br><br>Would it be an option to change your VS settings and in &#39;Tools &gt; Options &gt; Projects and Solutions &gt; Build and Run&#39;, uncheck &quot;Only build startup projects and dependencies on Run?&quot; If you do that, it will check/rebuild everything when you hit F5, not just the startup project and its dependencies. I believe that would fix your issue.<br>
<br>Petr<br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 11:22 AM, Andreas Haferburg <span dir="ltr">&lt;<a href="mailto:ahaferburg@scopis.com" target="_blank">ahaferburg@scopis.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
My initial explanation was bad.<br>
<br>
Both parent and child depend on a common library. If something in this lib changes, I need both of them to get rebuilt before executing parent.exe, since it will run child.exe.<br>
<br>
Sorry for the confusion.<span class="HOEnZb"><font color="#888888"><br>
<br>
Andreas</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On 08.02.2013 19:04, Nick Overdijk wrote:<br>
&gt; I&#39;m probably missing something, but why<br>
&gt;<br>
&gt;&gt; add_dependencies(parent child)<br>
&gt;<br>
&gt; ? That doesn&#39;t make sense. Parent is not using anything from child. You can just leave that line away and everything will be fine right?<br>
&gt;<br>
&gt; On 2013-08-02, at 16:24:21 , Andreas Haferburg wrote:<br>
&gt;<br>
&gt;&gt; Yes, that&#39;s pretty much the setup we have: The common (static) library contains almost all obj&#39;s, and the two exe projects only have a small main.obj and link against the library. I&#39;d like to eliminate the build(=link) time of child.exe by having the linker link both exes at the same time.<br>

&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Andreas<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 08.02.2013 15:41, Patrick Johnmeyer wrote:<br>
&gt;&gt;&gt; On Fri, Feb 8, 2013 at 8:16 AM, Andreas Haferburg &lt;<a href="mailto:ahaferburg@scopis.com" target="_blank">ahaferburg@scopis.com</a><br>
&gt;&gt;&gt; &lt;mailto:<a href="mailto:ahaferburg@scopis.com" target="_blank">ahaferburg@scopis.com</a>&gt;<u></u>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;     What happens is that common is built, then child, then parent, then parent is executed.<br>
&gt;&gt;&gt;     What I&#39;d like to happen is that common is built, then child+parent are being built concurrently,<br>
&gt;&gt;&gt;     and as soon as both are done, parent is executed.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Unfortunately that&#39;s just not how dependencies work. If parent is dependent on child, then child<br>
&gt;&gt;&gt; will build before parent in serial. And since they are both dependent on common, you essentially<br>
&gt;&gt;&gt; have a linear dependency in your example.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; You could break this up by creating a new target that is dependent on child and parent, and<br>
&gt;&gt;&gt; eliminate parent&#39;s direct dependency on child. This will allow child and parent to be built<br>
&gt;&gt;&gt; simultaneously. You would then need to &quot;do something&quot; with this new target so that it will cause<br>
&gt;&gt;&gt; &quot;parent&quot; to be run.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; You may be able to improve build times (assuming that is the driver) by invoking the compiler flag<br>
&gt;&gt;&gt; for parallel compilation. Another option may be to convert the majority of child and parent to<br>
&gt;&gt;&gt; another library, with small simple executable projects that invoke those libraries. This moves the<br>
&gt;&gt;&gt; dependencies around in a way that you *may* get better build performance ... but everything I say is<br>
&gt;&gt;&gt; speculative without knowing the nitty gritty of your project -- build times per project, full<br>
&gt;&gt;&gt; dependency graph, etc.<br>
&gt;&gt; --<br>
&gt;&gt;<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
&gt;<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</div></div></blockquote></div><br>