[LLVMdev] export of CMake project

Óscar Fuentes ofv at wanadoo.es
Fri Jun 18 09:39:49 PDT 2010


Jochen Wilhelmy <j.wilhelmy at arcor.de> writes:

> I'm porting my own projects to CMake (seems very cool) and I want to
> import LLVM as external libraries.
> To simplify this CMake supports an export feature that can export an
> LLVM.cmake file that lists all libraries of LLVM. With this I could
> simplify the use of LLVM in my own CMake project.

AFAIK exporting LLVM just provides the library names. How is that
useful? The really useful feature is to obtain the LLVM libraries from a
component name:

include($PATH_TO_LLVM_INSTALL/some-directory/llvm.cmake)

LLVM_LIBRARIES_FOR_COMPONENT(jit LLVM_LIBRARIES_I_NEED)

target_link_libraries(my_compiler $LLVM_LIBRARIES_I_NEED)

This is an often-requested feature. Maybe if I have some free time this
weekend...

[snip]




More information about the llvm-dev mailing list