<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 21, 2014 at 7:31 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 02/21/2014 09:49 AM, Alexey Samsonov wrote:<br>
> 1) Looks like "DEPENDS" option is just broken<br>
</div>> I use cmake 2.8.10.2.<br>
<br>
Dependencies on normal targets were accidentally broken in 2.8.9 and<br>
later fixed in 2.8.11 (along with a test case to keep it working):<br>
<br>
<a href="http://www.cmake.org/Bug/view.php?id=13849" target="_blank">http://www.cmake.org/Bug/view.php?id=13849</a><br>
<a href="http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0f1af92" target="_blank">http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0f1af92</a><br>
<div class=""><br>
> if I then change the Clang sources, and re-run "make compiler-rt",<br>
> Clang is re-built, but compiler-rt is *not* re-configured or re-built<br>
</div>[snip]<br>
<div class="">> even if I modify *sources* under projects/compiler-rt<br>
</div><div class="">> it doesn't re-build the compiler-rt libraries.<br>
<br>
</div>ExternalProject was originally designed for two purposes:<br>
<br>
* Build third-party dependences on which local development will<br>
not be done<br>
<br>
* Manage a "superbuild" project that has no binaries of its own<br>
but has a bunch of ExternalProject_Add calls to drive set up<br>
of a bunch of build trees. Local development then occurs in<br>
each tree manually.<br>
<br>
Using ExternalProject for a recursive-make-like structure was<br>
only later proposed as a use case. In order to make the build<br>
step always run you need to make it depend on an extra step that<br>
is always out of date:<br>
<br>
ExternalProject_Add_Step(compiler-rt always-build<br>
COMMENT "Always building MyCOnly..."<br>
DEPENDERS build<br>
ALWAYS 1<br>
)<br></blockquote><div><br></div><div>Great, thanks for suggestion! We can even use "DEPENDERS configure" instead of "DEPENDERS build" here.</div><div><br></div><div>And we'd better "clobber" the compiler-rt build tree if any of the dependencies change (we need to rebuild</div>
<div>every compiler-rt source from scratch if clang has changed).</div><div><br></div><div>I will also try to add support for running tests in compiler-rt build tree. I think this can be achieved by smth. like:</div><div>
add_custom_target(check-compiler-rt</div><div> COMMAND ${CMAKE_BUILD_TOOL} check-all</div><div> DEPENDS compiler-rt</div><div> WORKING_DIRECTORY ${COMPILER_RT_BUILD_DIR})</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-Brad<br>
<br>
</font></span></blockquote></div><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div></div>