[CMake] Use object library to build the two flavours of Polly.
commit50ec033305f1c471924846dcf66c0e15e54c5ffc
authorMichael Kruse <llvm@meinersbur.de>
Thu, 27 Apr 2017 16:13:03 +0000 (27 16:13 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Thu, 27 Apr 2017 16:13:03 +0000 (27 16:13 +0000)
tree3b27620f49be0ead3e5f545877d92f38b90ef1aa
parent9c266b0c321c002b0f04f8ff015ad8c615afe54e
[CMake] Use object library to build the two flavours of Polly.

Polly comes in two library flavors: One loadable module to use the
LLVM framework -load mechanism, and another one that host applications
can link to. These have very different requirements for Polly's
own dependencies.

The loadable module assumes that all its LLVM dependencies are already
available in the address space of the host application, and is not allowed
to bring in its own copy of any LLVM library (including the NVPTX
backend in case of Polly-ACC).

The non-module library is intended to be linked to using
target_link_libraries. CMake would then resolve all of its dependencies,
including NVPTX and ensure that only a single instance of each library
will be used.

Differential Revision: https://reviews.llvm.org/D32442

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@301558 91177308-0d34-0410-b5e6-96231b3b80d8
CMakeLists.txt
lib/CMakeLists.txt
unittests/CMakeLists.txt