conformance.cmake 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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_main.cc
  22. ${protobuf_source_dir}/conformance/binary_json_conformance_suite.cc
  23. ${protobuf_source_dir}/conformance/binary_json_conformance_suite.h
  24. ${protobuf_source_dir}/conformance/conformance_test_runner.cc
  25. ${protobuf_source_dir}/conformance/third_party/jsoncpp/json.h
  26. ${protobuf_source_dir}/conformance/third_party/jsoncpp/jsoncpp.cpp
  27. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
  28. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
  29. )
  30. add_executable(conformance_cpp
  31. ${protobuf_source_dir}/conformance/conformance.pb.cc
  32. ${protobuf_source_dir}/conformance/conformance_cpp.cc
  33. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
  34. ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
  35. )
  36. target_include_directories(
  37. conformance_test_runner
  38. PUBLIC ${protobuf_source_dir}/conformance)
  39. target_include_directories(
  40. conformance_cpp
  41. PUBLIC ${protobuf_source_dir}/conformance)
  42. target_link_libraries(conformance_test_runner libprotobuf)
  43. target_link_libraries(conformance_cpp libprotobuf)