!60 use c++17 to fix build error

From: @eaglegai 
Reviewed-by: @kircher 
Signed-off-by: @kircher
This commit is contained in:
openeuler-ci-bot 2023-07-28 03:29:13 +00:00 committed by Gitee
commit 5917352660
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,9 +1,10 @@
%global c_so_version 28
%global cpp_so_version 1.50
%global cpp_std 17
Name: grpc
Version: 1.50.1
Release: 1
Release: 2
Summary: A modern, open source high performance RPC framework that can run in any environment
License: ASL 2.0
URL: https://www.grpc.io
@ -59,11 +60,18 @@ sed -i 's:$(prefix)/lib:$(prefix)/%{_lib}:' Makefile
sed -i 's:^GTEST_LIB =.*::' Makefile
#avoid downloading
mkdir %{_builddir}/%{name}-%{version}/third_party/opencensus-proto/src
sed -r -i 's/(std=c\+\+)14/\1%{cpp_std}/g' \
setup.py grpc.gyp Rakefile \
examples/cpp/*/Makefile \
examples/cpp/*/CMakeLists.txt \
tools/run_tests/artifacts/artifact_targets.py \
tools/distrib/python/grpcio_tools/setup.py
%build
mkdir -p cmake/build
cd cmake/build
cmake ../../ -DgRPC_INSTALL=ON\
-DCMAKE_CXX_STANDARD:STRING=%{cpp_std} \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_PROTOBUF_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
@ -139,6 +147,12 @@ cd ../..
%{python3_sitearch}/grpcio-%{version}-py*
%changelog
* Fri Jul 28 2023 eaglegai <eaglegai@163.com> - 1.50.1-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:use c++17 to fix build error
* Fri Nov 11 2022 zhouyihang <zhouyihang3@h-partners.com> - 1.50.1-1
- Type:requirement
- ID:NA