From 6ee1f64a2e828d27a6c20839232b3ac828367123 Mon Sep 17 00:00:00 2001 From: xgupta Date: Tue, 2 Feb 2021 12:53:45 +0530 Subject: [PATCH] [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 --- clang/docs/RAVFrontendAction.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clang/docs/RAVFrontendAction.rst b/clang/docs/RAVFrontendAction.rst index 2c168a0..71722a1 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: -- 2.7.4