From 8b74557e30045886c2f6ec64fac9b589a1d53b8a Mon Sep 17 00:00:00 2001 From: Matt Kulukundis Date: Sun, 20 Feb 2022 14:42:55 -0500 Subject: [PATCH 1/3] test for previous definition --- upb/test_generated_code.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/upb/test_generated_code.cc b/upb/test_generated_code.cc index 86d8fe8edc..a3835d6ee5 100644 --- a/upb/test_generated_code.cc +++ b/upb/test_generated_code.cc @@ -35,7 +35,9 @@ #include "upb/test.upb.h" #include "upb/upb.hpp" +#if !defined(MIN) #define MIN(x, y) ((x) < (y) ? (x) : (y)) +#endif const char test_str[] = "abcdefg"; const char test_str2[] = "12345678910"; From 5d7daf1ce25edc4fb5263d85e27986af316b652e Mon Sep 17 00:00:00 2001 From: Matt Kulukundis Date: Sun, 20 Feb 2022 15:09:37 -0500 Subject: [PATCH 2/3] fix cmake --- cmake/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 83e0c1b562..7a961b3468 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -112,6 +112,7 @@ target_link_libraries(reflection upb) add_library(textformat ../upb/text_encode.c + ../upb/upb_internal.h ../upb/text_encode.h) target_link_libraries(textformat port @@ -119,6 +120,7 @@ target_link_libraries(textformat add_library(json ../upb/json_decode.c ../upb/json_encode.c + ../upb/upb_internal.h ../upb/json_decode.h ../upb/json_encode.h) target_link_libraries(json From 92d71a4667437f0572d24f960f351232ec6e0ee8 Mon Sep 17 00:00:00 2001 From: Matt Kulukundis Date: Sun, 20 Feb 2022 15:20:48 -0500 Subject: [PATCH 3/3] make deps explicit --- BUILD | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BUILD b/BUILD index e4384a1822..cf5206fe8d 100644 --- a/BUILD +++ b/BUILD @@ -304,6 +304,16 @@ upb_proto_reflection_library( deps = ["test_cpp_proto"], ) +upb_proto_library( + name = "timestamp_upb_proto", + deps = ["@com_google_protobuf//:timestamp_proto"], +) + +upb_proto_reflection_library( + name = "timestamp_upb_proto_reflection", + deps = ["@com_google_protobuf//:timestamp_proto"], +) + cc_test( name = "test_cpp", srcs = ["upb/test_cpp.cc"], @@ -311,6 +321,8 @@ cc_test( deps = [ ":test_cpp_upb_proto", ":test_cpp_upb_proto_reflection", + ":timestamp_upb_proto", + ":timestamp_upb_proto_reflection", "//:json", "//:port", "//:reflection",