From 8859c07a35d9c2c02b6565627fbbc87c152cb731 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 4 May 2017 15:11:11 -0700 Subject: Add missing files to build files. --- BUILD | 1 + cmake/extract_includes.bat.in | 2 ++ cmake/libprotobuf.cmake | 1 + src/Makefile.am | 1 + src/google/protobuf/generated_message_table_driven.cc | 6 +++--- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/BUILD b/BUILD index e5662c4d..da152495 100644 --- a/BUILD +++ b/BUILD @@ -128,6 +128,7 @@ cc_library( "src/google/protobuf/extension_set_heavy.cc", "src/google/protobuf/field_mask.pb.cc", "src/google/protobuf/generated_message_reflection.cc", + "src/google/protobuf/generated_message_table_driven.cc", "src/google/protobuf/io/gzip_stream.cc", "src/google/protobuf/io/printer.cc", "src/google/protobuf/io/strtod.cc", diff --git a/cmake/extract_includes.bat.in b/cmake/extract_includes.bat.in index 245e917f..3faf33f5 100644 --- a/cmake/extract_includes.bat.in +++ b/cmake/extract_includes.bat.in @@ -50,6 +50,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\field_mask.pb.h" incl copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_reflection.h" include\google\protobuf\generated_enum_reflection.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_enum_util.h" include\google\protobuf\generated_enum_util.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_reflection.h" include\google\protobuf\generated_message_reflection.h +copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_table_driven.h" include\google\protobuf\generated_message_table_driven.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\generated_message_util.h" include\google\protobuf\generated_message_util.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\has_bits.h" include\google\protobuf\has_bits.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\io\coded_stream.h" include\google\protobuf\io\coded_stream.h @@ -70,6 +71,7 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\map_type_handler.h" i copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\message.h" include\google\protobuf\message.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\message_lite.h" include\google\protobuf\message_lite.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\metadata.h" include\google\protobuf\metadata.h +copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\metadata_lite.h" include\google\protobuf\metadata_lite.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\reflection.h" include\google\protobuf\reflection.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\reflection_ops.h" include\google\protobuf\reflection_ops.h copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\repeated_field.h" include\google\protobuf\repeated_field.h diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake index 5313d39e..faecf2e6 100644 --- a/cmake/libprotobuf.cmake +++ b/cmake/libprotobuf.cmake @@ -13,6 +13,7 @@ set(libprotobuf_files ${protobuf_source_dir}/src/google/protobuf/extension_set_heavy.cc ${protobuf_source_dir}/src/google/protobuf/field_mask.pb.cc ${protobuf_source_dir}/src/google/protobuf/generated_message_reflection.cc + ${protobuf_source_dir}/src/google/protobuf/generated_message_table_driven.cc ${protobuf_source_dir}/src/google/protobuf/io/gzip_stream.cc ${protobuf_source_dir}/src/google/protobuf/io/printer.cc ${protobuf_source_dir}/src/google/protobuf/io/strtod.cc diff --git a/src/Makefile.am b/src/Makefile.am index bfb875ac..5c19bcdc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -250,6 +250,7 @@ libprotobuf_la_SOURCES = \ google/protobuf/extension_set_heavy.cc \ google/protobuf/field_mask.pb.cc \ google/protobuf/generated_message_reflection.cc \ + google/protobuf/generated_message_table_driven.cc \ google/protobuf/map_field.cc \ google/protobuf/message.cc \ google/protobuf/reflection_internal.h \ diff --git a/src/google/protobuf/generated_message_table_driven.cc b/src/google/protobuf/generated_message_table_driven.cc index e281266d..f8fda9c6 100644 --- a/src/google/protobuf/generated_message_table_driven.cc +++ b/src/google/protobuf/generated_message_table_driven.cc @@ -74,7 +74,7 @@ inline Arena* GetArena(MessageLite* msg, int64 arena_offset) { template inline Type* AddField(MessageLite* msg, int64 offset) { #if LANG_CXX11 - static_assert(std::is_trivially_copy_assignable::value, + static_assert(google::protobuf::internal::has_trivial_copy::value, "Do not assign"); #endif @@ -94,7 +94,7 @@ inline string* AddField(MessageLite* msg, int64 offset) { template inline void AddField(MessageLite* msg, int64 offset, Type value) { #if LANG_CXX11 - static_assert(std::is_trivially_copy_assignable::value, + static_assert(google::protobuf::internal::has_trivial_copy::value, "Do not assign"); #endif *AddField(msg, offset) = value; @@ -118,7 +118,7 @@ template inline void SetField(MessageLite* msg, uint32* has_bits, uint32 has_bit_index, int64 offset, Type value) { #if LANG_CXX11 - static_assert(std::is_trivially_copy_assignable::value, + static_assert(google::protobuf::internal::has_trivial_copy::value, "Do not assign"); #endif *MutableField(msg, has_bits, has_bit_index, offset) = value; -- cgit v1.2.3 From 3a5a0724f300e9c7de98851a0bbaaa4363981486 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 4 May 2017 15:24:55 -0700 Subject: Skip C# test in C++ only distribution. --- src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc b/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc index 4e44b578..5c54270e 100644 --- a/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc +++ b/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc @@ -134,6 +134,14 @@ class GenerateAndTest { }; TEST(CsharpBootstrapTest, GeneratedCsharpDescriptorMatches) { + // Skip this whole test if the csharp directory doesn't exist (i.e., a C++11 + // only distribution). + string descriptor_file_name = + "../csharp/src/Google.Protobuf/Reflection/Descriptor.cs"; + if (!File::Exists(TestSourceDir() + "/" + descriptor_file_name)) { + return; + } + MockErrorCollector error_collector; DiskSourceTree source_tree; Importer importer(&source_tree, &error_collector); -- cgit v1.2.3 From 7378ec2bc8da17ba4b1050dbb1ff05425f05537e Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 4 May 2017 15:27:30 -0700 Subject: Add missing LIBRPOTOC_EXPORT. --- src/google/protobuf/compiler/code_generator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/google/protobuf/compiler/code_generator.h b/src/google/protobuf/compiler/code_generator.h index b917d373..6ea5f18d 100644 --- a/src/google/protobuf/compiler/code_generator.h +++ b/src/google/protobuf/compiler/code_generator.h @@ -162,8 +162,8 @@ typedef GeneratorContext OutputDirectory; // "foo=bar,baz,qux=corge" // parses to the pairs: // ("foo", "bar"), ("baz", ""), ("qux", "corge") -extern void ParseGeneratorParameter(const string&, - std::vector >*); +LIBPROTOC_EXPORT void ParseGeneratorParameter( + const string&, std::vector >*); } // namespace compiler } // namespace protobuf -- cgit v1.2.3