The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

163 lines
3.9 KiB

# This file was generated from BUILD using tools/make_cmakelists.py.
cmake_minimum_required(VERSION 3.1)
if(${CMAKE_VERSION} VERSION_LESS 3.12)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
else()
cmake_policy(VERSION 3.12)
endif()
cmake_minimum_required (VERSION 3.0)
cmake_policy(SET CMP0048 NEW)
project(upb)
# Prevent CMake from setting -rdynamic on Linux (!!).
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
# Set default build type.
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
FORCE)
endif()
# When using Ninja, compiler output won't be colorized without this.
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-fdiagnostics-color=always SUPPORTS_COLOR_ALWAYS)
if(SUPPORTS_COLOR_ALWAYS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
endif()
# Implement ASAN/UBSAN options
if(UPB_ENABLE_ASAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
endif()
if(UPB_ENABLE_UBSAN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
endif()
include_directories(.)
include_directories(generated_for_cmake)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup -flat_namespace")
elseif(UNIX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id")
endif()
enable_testing()
add_library(port
upb/port.c)
add_library(upb
upb/decode.c
upb/encode.c
upb/msg.c
upb/msg.h
upb/table.c
upb/table.int.h
upb/upb.c
upb/decode.h
upb/encode.h
upb/upb.h)
target_link_libraries(upb
port)
add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE)
target_link_libraries(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE
table
upb)
add_library(reflection
upb/def.c
upb/msg.h
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
upb/reflection.c
upb/def.h
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
upb/reflection.h)
target_link_libraries(reflection
descriptor_upbproto
port
table
upb)
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
add_library(textformat
upb/text_encode.c
upb/text_encode.h)
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
target_link_libraries(textformat
port
Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621
5 years ago
reflection)
add_library(json
upb/json_encode.c
upb/json_encode.h)
target_link_libraries(json
port
reflection
upb)
add_library(table INTERFACE)
target_link_libraries(table INTERFACE
port
upb)
add_library(handlers
upb/handlers.c
upb/handlers-inl.h
upb/sink.c
upb/handlers.h
upb/sink.h)
target_link_libraries(handlers
port
reflection
table
upb)
add_library(upb_pb
upb/pb/compile_decoder.c
upb/pb/decoder.c
upb/pb/decoder.int.h
upb/pb/encoder.c
upb/pb/textprinter.c
upb/pb/varint.c
upb/pb/varint.int.h
upb/pb/decoder.h
upb/pb/encoder.h
upb/pb/textprinter.h)
target_link_libraries(upb_pb
descriptor_upbproto
handlers
port
reflection
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)
target_link_libraries(upb_json
upb
upb_pb)
add_library(upb_cc_bindings INTERFACE)
target_link_libraries(upb_cc_bindings INTERFACE
descriptor_upbproto
handlers
port
upb)
add_library(upb_test
tests/testmain.cc
tests/test_util.h
tests/upb_test.h)
target_link_libraries(upb_test
handlers
port
upb)