[clang] cac8cd0 - [clang] [unittest/AST] Fix linking to LLVMTestingSupport

Michał Górny via cfe-commits cfe-commits at lists.llvm.org
Fri May 1 12:28:32 PDT 2020


Author: Michał Górny
Date: 2020-05-01T21:22:51+02:00
New Revision: cac8cd0a16e9c0410e33aaca93c760c503eeb68e

URL: https://github.com/llvm/llvm-project/commit/cac8cd0a16e9c0410e33aaca93c760c503eeb68e
DIFF: https://github.com/llvm/llvm-project/commit/cac8cd0a16e9c0410e33aaca93c760c503eeb68e.diff

LOG: [clang] [unittest/AST] Fix linking to LLVMTestingSupport

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.

Added: 
    

Modified: 
    clang/unittests/AST/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang/unittests/AST/CMakeLists.txt b/clang/unittests/AST/CMakeLists.txt
index 868635b6eea5..5d9ff5b97dbd 100644
--- a/clang/unittests/AST/CMakeLists.txt
+++ b/clang/unittests/AST/CMakeLists.txt
@@ -43,5 +43,9 @@ clang_target_link_libraries(ASTTests
   clangFrontend
   clangSerialization
   clangTooling
-  LLVMTestingSupport
   )
+
+target_link_libraries(ASTTests
+  PRIVATE
+  LLVMTestingSupport
+)


        


More information about the cfe-commits mailing list