Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc-tools: Update protoc to v3.19.1 #2253

Merged
merged 6 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions packages/grpc-tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.7)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

# MSVC runtime library flags are selected by an abstraction.
if(COMMAND cmake_policy AND POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/protobuf)
add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake deps/protobuf)

set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests")
set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build protobuf with zlib.")
set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/protobuf)
add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake deps/protobuf)

set(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-stack-protector")
Expand All @@ -22,8 +26,21 @@ add_executable(grpc_node_plugin
)

if (MSVC)
add_definitions(/MTd)
endif (MSVC)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>)
else ()
foreach (flag_var
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if (${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif (${flag_var} MATCHES "/MD")
endforeach (flag_var)
endif ()
endif (MVC)

target_include_directories(grpc_node_plugin
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
Expand All @@ -34,4 +51,4 @@ target_include_directories(grpc_node_plugin
target_link_libraries(grpc_node_plugin
libprotoc
libprotobuf
)
)
2 changes: 1 addition & 1 deletion packages/grpc-tools/deps/protobuf
Submodule protobuf updated 1018 files
2 changes: 1 addition & 1 deletion packages/grpc-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grpc-tools",
"version": "1.11.3",
"version": "1.12.0",
"author": "Google Inc.",
"description": "Tools for developing with gRPC on Node.js",
"homepage": "https://grpc.io/",
Expand Down