1set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD}) 2set(CMAKE_CXX_FLAGS ${CXX_FLAGS_NOFUZZ}) 3 4# Needed by LLVM's CMake checks because this file defines multiple targets. 5set(LLVM_OPTIONAL_SOURCES proto_to_cxx.cpp proto_to_cxx_main.cpp 6 loop_proto_to_cxx.cpp loop_proto_to_cxx_main.cpp) 7 8add_clang_library(clangProtoToCXX proto_to_cxx.cpp 9 DEPENDS clangCXXProto 10 LINK_LIBS clangCXXProto ${PROTOBUF_LIBRARIES} 11 ) 12 13add_clang_library(clangLoopProtoToCXX loop_proto_to_cxx.cpp 14 DEPENDS clangCXXLoopProto 15 LINK_LIBS clangCXXLoopProto ${PROTOBUF_LIBRARIES} 16 ) 17target_include_directories(clangProtoToCXX PRIVATE .) 18target_include_directories(clangLoopProtoToCXX PRIVATE .) 19 20add_clang_executable(clang-proto-to-cxx proto_to_cxx_main.cpp) 21add_clang_executable(clang-loop-proto-to-cxx loop_proto_to_cxx_main.cpp) 22 23target_link_libraries(clang-proto-to-cxx PRIVATE clangProtoToCXX) 24target_link_libraries(clang-loop-proto-to-cxx PRIVATE clangLoopProtoToCXX) 25