I managed to build llvm and clang and now I am trying to create a ClangTool according to clang docs. But I am getting the following error when I am trying to build i
You need to use keyword signature of target_link_libraries
; effectively, you need to add PRIVATE
to the target_link_libraries
statement in your CMakeLists.txt
:
target_link_libraries(loop-convert PRIVATE
clangTooling
clangBasic
clangASTMatchers
)
This is because add_llvm_executable
uses such signature and you can't mix them in CMake.