Source release 16.4.0
This commit is contained in:
18
third_party/protobuf/cmake/tests.cmake
vendored
18
third_party/protobuf/cmake/tests.cmake
vendored
@@ -67,6 +67,7 @@ set(tests_protos
|
||||
google/protobuf/unittest_proto3_arena.proto
|
||||
google/protobuf/unittest_proto3_arena_lite.proto
|
||||
google/protobuf/unittest_proto3_lite.proto
|
||||
google/protobuf/unittest_proto3_optional.proto
|
||||
google/protobuf/unittest_well_known_types.proto
|
||||
google/protobuf/util/internal/testdata/anys.proto
|
||||
google/protobuf/util/internal/testdata/books.proto
|
||||
@@ -93,6 +94,7 @@ macro(compile_proto_file filename)
|
||||
COMMAND protoc ${protobuf_source_dir}/src/${dirname}/${basename}.proto
|
||||
--proto_path=${protobuf_source_dir}/src
|
||||
--cpp_out=${protobuf_source_dir}/src
|
||||
--experimental_allow_proto3_optional
|
||||
)
|
||||
endmacro(compile_proto_file)
|
||||
|
||||
@@ -114,7 +116,7 @@ endforeach(proto_file)
|
||||
|
||||
set(common_test_files
|
||||
${protobuf_source_dir}/src/google/protobuf/arena_test_util.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/map_test_util.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/map_test_util.inc
|
||||
${protobuf_source_dir}/src/google/protobuf/test_util.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/test_util.inc
|
||||
${protobuf_source_dir}/src/google/protobuf/testing/file.cc
|
||||
@@ -132,7 +134,6 @@ set(tests_files
|
||||
${protobuf_source_dir}/src/google/protobuf/arena_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/arenastring_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/annotation_test_util.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_move_unittest.cc
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc
|
||||
@@ -203,12 +204,21 @@ set(tests_files
|
||||
${protobuf_source_dir}/src/google/protobuf/wire_format_unittest.cc
|
||||
)
|
||||
|
||||
set(non_msvc_tests_files
|
||||
${protobuf_source_dir}/src/google/protobuf/compiler/command_line_interface_unittest.cc
|
||||
)
|
||||
|
||||
set(all_tests_files
|
||||
${tests_files}
|
||||
${non_msvc_tests_files}
|
||||
)
|
||||
|
||||
if(protobuf_ABSOLUTE_TEST_PLUGIN_PATH)
|
||||
add_compile_options(-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH="$<TARGET_FILE:test_plugin>")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set_source_files_properties(${tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing")
|
||||
set_source_files_properties(${all_tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing")
|
||||
|
||||
# required for tests on MinGW Win64
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
@@ -218,7 +228,7 @@ if(MINGW)
|
||||
|
||||
endif()
|
||||
|
||||
add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
|
||||
add_executable(tests ${all_tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
|
||||
target_link_libraries(tests libprotoc libprotobuf gmock_main)
|
||||
|
||||
set(test_plugin_files
|
||||
|
||||
Reference in New Issue
Block a user