• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2add_custom_command(
3  OUTPUT ${protobuf_source_dir}/conformance/conformance.pb.cc
4  DEPENDS protoc ${protobuf_source_dir}/conformance/conformance.proto
5  COMMAND protoc ${protobuf_source_dir}/conformance/conformance.proto
6      --proto_path=${protobuf_source_dir}/conformance
7      --cpp_out=${protobuf_source_dir}/conformance
8)
9
10add_custom_command(
11  OUTPUT ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
12         ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
13  DEPENDS protoc ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto
14          protoc ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto
15  COMMAND protoc ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.proto
16                 ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.proto
17      --proto_path=${protobuf_source_dir}/src
18      --cpp_out=${protobuf_source_dir}/src
19)
20
21add_executable(conformance_test_runner
22  ${protobuf_source_dir}/conformance/conformance.pb.cc
23  ${protobuf_source_dir}/conformance/conformance_test.cc
24  ${protobuf_source_dir}/conformance/binary_json_conformance_main.cc
25  ${protobuf_source_dir}/conformance/binary_json_conformance_suite.cc
26  ${protobuf_source_dir}/conformance/binary_json_conformance_suite.h
27  ${protobuf_source_dir}/conformance/conformance_test_runner.cc
28  ${protobuf_source_dir}/conformance/third_party/jsoncpp/json.h
29  ${protobuf_source_dir}/conformance/third_party/jsoncpp/jsoncpp.cpp
30  ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
31  ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
32)
33
34add_executable(conformance_cpp
35  ${protobuf_source_dir}/conformance/conformance.pb.cc
36  ${protobuf_source_dir}/conformance/conformance_cpp.cc
37  ${protobuf_source_dir}/src/google/protobuf/test_messages_proto3.pb.cc
38  ${protobuf_source_dir}/src/google/protobuf/test_messages_proto2.pb.cc
39)
40
41target_include_directories(
42  conformance_test_runner
43  PUBLIC ${protobuf_source_dir}/conformance)
44
45target_include_directories(
46  conformance_cpp
47  PUBLIC ${protobuf_source_dir}/conformance)
48
49target_link_libraries(conformance_test_runner libprotobuf)
50target_link_libraries(conformance_cpp libprotobuf)
51