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