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