[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.
git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@301095 91177308-0d34-0410-b5e6-96231b3b80d8