conformance.cmake 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. add_custom_command(
  2. OUTPUT ${protobuf_source_dir}/conformance/conformance.pb.cc
  3. DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/conformance/conformance.proto
  4. COMMAND ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/conformance/conformance.proto
  5. --proto_path=${protobuf_source_dir}/conformance
  6. --cpp_out=${protobuf_source_dir}/conformance
  7. )
  8. add_custom_command(
  9. OUTPUT ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
  10. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
  11. DEPENDS ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto
  12. ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto
  13. COMMAND ${protobuf_PROTOC_EXE} ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto
  14. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto
  15. --proto_path=${protobuf_source_dir}/src
  16. --cpp_out=${protobuf_source_dir}/src
  17. )
  18. add_executable(conformance_test_runner
  19. ${protobuf_source_dir}/conformance/conformance.pb.cc
  20. ${protobuf_source_dir}/conformance/conformance_test.cc
  21. ${protobuf_source_dir}/conformance/binary_json_conformance_suite.cc
  22. ${protobuf_source_dir}/conformance/binary_json_conformance_suite.h
  23. ${protobuf_source_dir}/conformance/conformance_test_runner.cc
  24. ${protobuf_source_dir}/conformance/third_party/jsoncpp/json.h
  25. ${protobuf_source_dir}/conformance/third_party/jsoncpp/jsoncpp.cpp
  26. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
  27. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
  28. )
  29. add_executable(conformance_cpp
  30. ${protobuf_source_dir}/conformance/conformance.pb.cc
  31. ${protobuf_source_dir}/conformance/conformance_cpp.cc
  32. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
  33. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
  34. )
  35. target_include_directories(
  36. conformance_test_runner
  37. PUBLIC ${protobuf_source_dir}/conformance)
  38. target_include_directories(
  39. conformance_cpp
  40. PUBLIC ${protobuf_source_dir}/conformance)
  41. target_link_libraries(conformance_test_runner libprotobuf)
  42. target_link_libraries(conformance_cpp libprotobuf)