[CMake] Fix unittests in out-of-LLVM-tree builds.
authorMichael Kruse <llvm@meinersbur.de>
Sat, 22 Apr 2017 23:02:46 +0000 (23:02 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Sat, 22 Apr 2017 23:02:46 +0000 (23:02 +0000)
commit9c19d1f3aa0c14ae04a9e94b11e5c8519698f9c9
tree9e82da762fe2c72c7cacf955f5a1988ab5136b6d
parent26af2a993a63e00ba5908121ff001c915e917289
[CMake] Fix unittests in out-of-LLVM-tree builds.

Unittests are linked against a subset of LLVM libraries and its
transitive dependencies resolved by CMake. The information about indirect
library dependency is not available when building separately from
LLVM, which result in missing symbol errors while linking.

Resolve this issue by querying llvm-config about the available
LLVM libraries and link against all of them, since dependence
information is still not available.

llvm-svn: 301095
polly/CMakeLists.txt
polly/unittests/CMakeLists.txt