[PATCH] [CMake] Resurrect add_dependencies() and target_link_libraries()

Chandler Carruth chandlerc at google.com
Thu Feb 27 19:53:01 PST 2014


On Thu, Feb 27, 2014 at 7:11 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> >> What I had in mind was defining a LLVM_LINK_TYPE that is INTERFACE,
> >> PUBLIC or PRIVATE depending on the build type. Is that possible?
> >
> > I think link type would depend on relationship between linker and linkee.
> > Each library might be STATIC or SHARED.
> > (This was one of reasons why I took target_link_libraries under control)
>
> If that is what it takes to be able to compute it, I think we should
> keep it, but maybe we can still get the flexibility while using the
> more familiar target_link_libraries.
>

FWIW, I'm happy with this strategy too.


>
> >> I was looking at AddLLVM.cmake, but I don't quite understand it. For
> >> example, where is ARG_MODULE set?
> >
> > ARG_XXX is set by cmake_parse_arguments(ARG ...).
>
> OK. Maybe we could define
>
> LLVM_LINK_TYPE_SHARED
> LLVM_LINK_TYPE_STATIC
> LLVM_LINK_TYPE_DEFAULT (based on BUILD_SHARED_LIBS).
>

And this looks really nice if it works.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140227/06b27ee8/attachment.html>


More information about the cfe-commits mailing list