[clang] 6ee1f64 - [NFC][Docs] Fix RAVFrontendAction doc's CMakelists.txt for Shared build

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 1 23:40:53 PST 2021


Author: xgupta
Date: 2021-02-02T13:08:40+05:30
New Revision: 6ee1f64a2e828d27a6c20839232b3ac828367123

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

LOG: [NFC][Docs] Fix RAVFrontendAction doc's CMakelists.txt for Shared build

[[ https://clang.llvm.org/docs/RAVFrontendAction.html | Example tutorial ]] giving undefine reference error while building with BUILD_SHARED_LIBS=ON.

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

Added: 
    

Modified: 
    clang/docs/RAVFrontendAction.rst

Removed: 
    


################################################################################
diff  --git a/clang/docs/RAVFrontendAction.rst b/clang/docs/RAVFrontendAction.rst
index 2c168a0577e1..71722a15936a 100644
--- a/clang/docs/RAVFrontendAction.rst
+++ b/clang/docs/RAVFrontendAction.rst
@@ -207,7 +207,14 @@ following CMakeLists.txt to link it:
 
     add_clang_executable(find-class-decls FindClassDecls.cpp)
 
-    target_link_libraries(find-class-decls clangTooling)
+    target_link_libraries(find-class-decls 
+      PRIVATE
+      clangAST
+      clangBasic
+      clangFrontend
+      clangSerialization
+      clangTooling
+      )
 
 When running this tool over a small code snippet it will output all
 declarations of a class n::m::C it found:


        


More information about the cfe-commits mailing list