Cmake and pass

Hi,

Is it possible to generate pass (shared object) from Cmake?
I tried to use add_llvm_library() however it produces only static
libs.

Thanks, Mariusz.

mg <mariusz.grad@googlemail.com> writes:

Is it possible to generate pass (shared object) from Cmake?

?

Please name the library or libraries you want to build as shared
objects.

I tried to use add_llvm_library() however it produces only static
libs.

As mentioned on http://www.llvm.org/docs/CMake.html :

cmake -DBUILD_SHARED_LIBS=ON path/to/llvm/source

This builds all LLVM libraries as shared objects, though.

Works great.
Thank You.

CMakeLists.txt looks like this:
set(BUILD_SHARED_LIBS "ON")
add_llvm_library(LLVMfoo pass/main.cc)

It generates Debug/lib/libLLVMfoo.so which then can be loaded with opt
-load.