Previously, USRGeneration was implemented by clangIndex. However, that poses too broad library layering constraints on the ever growing set of users of a tiny component of it, USRGeneration. This PR splits that into a small library, called: clangUnifiedSymbolResolution Anyone needing USRGeneration could simply link against this without pulling in everything from clangIndex. --- Importantly, clangIndex linked against clangFrontend to define its FrontendAction, and use some ASTUnit APIs. Some users may want to use USRGeneration but NOT depend on clangFrontend. This new clangUnifiedSymbolResolution library would solve such circular dependencies. PS: There were quite a few cases where libraries could just link against clangUnifiedSymbolResolution without linking to clangIndex. I've simplified those cases in this PR, to keep link deps minimal.
51 lines
783 B
CMake
51 lines
783 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
support
|
|
BitstreamReader
|
|
FrontendOpenMP
|
|
)
|
|
add_subdirectory(support)
|
|
|
|
add_clang_library(clangDoc STATIC
|
|
BitcodeReader.cpp
|
|
BitcodeWriter.cpp
|
|
ClangDoc.cpp
|
|
Generators.cpp
|
|
HTMLGenerator.cpp
|
|
Mapper.cpp
|
|
MDGenerator.cpp
|
|
Representation.cpp
|
|
Serialize.cpp
|
|
YAMLGenerator.cpp
|
|
JSONGenerator.cpp
|
|
MDMustacheGenerator.cpp
|
|
|
|
DEPENDS
|
|
omp_gen
|
|
ClangDriverOptions
|
|
)
|
|
|
|
clang_target_link_libraries(clangDoc
|
|
PRIVATE
|
|
clangDocSupport
|
|
clangAnalysis
|
|
clangAST
|
|
clangASTMatchers
|
|
clangBasic
|
|
clangFrontend
|
|
clangLex
|
|
clangTooling
|
|
clangToolingCore
|
|
clangUnifiedSymbolResolution
|
|
)
|
|
|
|
target_link_libraries(clangDoc
|
|
PRIVATE
|
|
clangDocSupport
|
|
)
|
|
|
|
add_subdirectory(tool)
|
|
|
|
if (LLVM_INCLUDE_BENCHMARKS)
|
|
add_subdirectory(benchmarks)
|
|
endif()
|