[clang] [unittest/AST] Fix linking to LLVMTestingSupport
authorMichał Górny <mgorny@gentoo.org>
Fri, 1 May 2020 19:22:33 +0000 (21:22 +0200)
committerMichał Górny <mgorny@gentoo.org>
Fri, 1 May 2020 19:22:51 +0000 (21:22 +0200)
Link to LLVMTestingSupport via target_link_libraries() instead of
clang_target_link_libraries().  The latter is ineffective if tests
are linked to libclang.so.  This solution is consistent with what other
tests do.

clang/unittests/AST/CMakeLists.txt

index 868635b..5d9ff5b 100644 (file)
@@ -43,5 +43,9 @@ clang_target_link_libraries(ASTTests
   clangFrontend
   clangSerialization
   clangTooling
-  LLVMTestingSupport
   )
+
+target_link_libraries(ASTTests
+  PRIVATE
+  LLVMTestingSupport
+)