“uses of target_link_libraries must be either all-keyword or all-plain”

前端 未结 1 1494
半阙折子戏
半阙折子戏 2020-12-31 11:53

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

相关标签:
1条回答
  • 2020-12-31 12:09

    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.

    0 讨论(0)
提交回复
热议问题