Erick Velez 1c3320cdde
[clang-doc] add a JSON generator (#142483)
Adds a JSON generator backend to emit mapped information as JSON. This will enable a better testing format for upcoming changes. It can also potentially serve to feed our other backend generators in the future, like Mustache which already serializes information to JSON before emitting as HTML.

This patch contains functionality to emit classes and provides most of the basis of the generator.
2025-06-10 08:39:42 -07:00

47 lines
704 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
HTMLMustacheGenerator.cpp
JSONGenerator.cpp
DEPENDS
omp_gen
ClangDriverOptions
)
clang_target_link_libraries(clangDoc
PRIVATE
clangDocSupport
clangAnalysis
clangAST
clangASTMatchers
clangBasic
clangFrontend
clangIndex
clangLex
clangTooling
clangToolingCore
)
target_link_libraries(clangDoc
PRIVATE
clangDocSupport
)
add_subdirectory(tool)