diff options
-rw-r--r-- | BUILD | 78 | ||||
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | WORKSPACE | 7 | ||||
-rwxr-xr-x | tools/make_cmakelists.py | 4 |
4 files changed, 47 insertions, 43 deletions
@@ -350,45 +350,45 @@ cc_test( copts = CPPOPTS, ) -#upb_proto_library( -# name = "conformance_proto_upb", -# deps = ["@com_google_protobuf//:conformance_proto"], -#) - -#upb_proto_library( -# name = "test_messages_proto3_proto_upb", -# deps = ["@com_google_protobuf//:test_messages_proto3_proto"], -#) - -#cc_binary( -# name = "conformance_upb", -# srcs = [ -# "tests/conformance_upb.c", -# ], -# copts = COPTS + ["-Ibazel-out/k8-fastbuild/bin"], -# deps = [ -# ":conformance_proto_upb", -# ":test_messages_proto3_proto_upb", -# ":upb", -# ], -#) -# -#make_shell_script( -# name = "gen_test_conformance_upb", -# out = "test_conformance_upb.sh", -# contents = "$(rlocation com_google_protobuf/conformance_test_runner) $(rlocation upb/conformance_upb)", -#) -# -#sh_test( -# name = "test_conformance_upb", -# srcs = ["test_conformance_upb.sh"], -# data = [ -# "tests/conformance_upb_failures.txt", -# ":conformance_upb", -# "@bazel_tools//tools/bash/runfiles", -# "@com_google_protobuf//:conformance_test_runner", -# ], -#) +upb_proto_library( + name = "conformance_proto_upb", + deps = ["@com_google_protobuf//:conformance_proto"], +) + +upb_proto_library( + name = "test_messages_proto3_proto_upb", + deps = ["@com_google_protobuf//:test_messages_proto3_proto"], +) + +cc_binary( + name = "conformance_upb", + srcs = [ + "tests/conformance_upb.c", + ], + copts = COPTS + ["-Ibazel-out/k8-fastbuild/bin"], + deps = [ + ":conformance_proto_upb", + ":test_messages_proto3_proto_upb", + ":upb", + ], +) + +make_shell_script( + name = "gen_test_conformance_upb", + out = "test_conformance_upb.sh", + contents = "$(rlocation com_google_protobuf/conformance_test_runner) $(rlocation upb/conformance_upb)", +) + +sh_test( + name = "test_conformance_upb", + srcs = ["test_conformance_upb.sh"], + data = [ + "tests/conformance_upb_failures.txt", + ":conformance_upb", + "@bazel_tools//tools/bash/runfiles", + "@com_google_protobuf//:conformance_test_runner", + ], +) # Amalgamation ################################################################# diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e08cd7..e6bc5b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,7 @@ target_link_libraries(upb_pb table upb) add_library(upb_json + generated_for_cmake/upb/json/parser.c upb/json/printer.c upb/json/parser.h upb/json/printer.h) @@ -17,8 +17,11 @@ http_archive( git_repository( name = "com_google_protobuf", - commit = "ec1a70913e5793a7d0a7b5fbf7e0e4f75409dd41", - remote = "https://github.com/protocolbuffers/protobuf.git", + # TODO(haberman): update to protobuf branch oncd this is merged: + # https://github.com/protocolbuffers/protobuf/pull/6126 + #remote = "https://github.com/protocolbuffers/protobuf.git", + commit = "2996da4d817dd006cd8599c74ad2364a897d6107", + remote = "https://github.com/haberman/protobuf.git", ) http_archive( diff --git a/tools/make_cmakelists.py b/tools/make_cmakelists.py index e320be4..36d5375 100755 --- a/tools/make_cmakelists.py +++ b/tools/make_cmakelists.py @@ -43,8 +43,8 @@ class BuildFileFunctions(object): for file in files: if os.path.isfile(file): found_files.append(file) - elif os.path.isfile("generated/" + file): - found_files.append("generated/" + file) + elif os.path.isfile("generated_for_cmake/" + file): + found_files.append("generated_for_cmake/" + file) else: print("Warning: no such file: " + file) |