Added version macros (#31033)

pull/31572/head
Esun Kim 2 years ago committed by GitHub
parent 6cab039cf5
commit 8696d49e23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      BUILD
  2. 2
      CMakeLists.txt
  3. 2
      build_autogenerated.yaml
  4. 1
      gRPC-C++.podspec
  5. 1
      include/grpcpp/grpcpp.h
  6. 27
      include/grpcpp/version_info.h
  7. 5
      src/cpp/common/version_cc.cc
  8. 29
      templates/include/grpcpp/version_info.h.template
  9. 31
      templates/src/cpp/common/version_cc.cc.template
  10. 1
      tools/doxygen/Doxyfile.c++
  11. 1
      tools/doxygen/Doxyfile.c++.internal

@ -363,6 +363,7 @@ GRPCXX_PUBLIC_HDRS = [
"include/grpcpp/server_builder.h",
"include/grpcpp/server_context.h",
"include/grpcpp/server_posix.h",
"include/grpcpp/version_info.h",
"include/grpcpp/support/async_stream.h",
"include/grpcpp/support/async_unary_call.h",
"include/grpcpp/support/byte_buffer.h",

2
CMakeLists.txt generated

@ -3483,6 +3483,7 @@ foreach(_hdr
include/grpcpp/support/sync_stream.h
include/grpcpp/support/time.h
include/grpcpp/support/validate_service_config.h
include/grpcpp/version_info.h
include/grpcpp/xds_server_builder.h
)
string(REPLACE "include/" "" _path ${_hdr})
@ -4155,6 +4156,7 @@ foreach(_hdr
include/grpcpp/support/sync_stream.h
include/grpcpp/support/time.h
include/grpcpp/support/validate_service_config.h
include/grpcpp/version_info.h
)
string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH)

@ -2866,6 +2866,7 @@ libs:
- include/grpcpp/support/sync_stream.h
- include/grpcpp/support/time.h
- include/grpcpp/support/validate_service_config.h
- include/grpcpp/version_info.h
- include/grpcpp/xds_server_builder.h
headers:
- src/core/ext/transport/binder/client/binder_connector.h
@ -3281,6 +3282,7 @@ libs:
- include/grpcpp/support/sync_stream.h
- include/grpcpp/support/time.h
- include/grpcpp/support/validate_service_config.h
- include/grpcpp/version_info.h
headers:
- src/cpp/client/create_channel_internal.h
- src/cpp/common/channel_filter.h

1
gRPC-C++.podspec generated

@ -194,6 +194,7 @@ Pod::Spec.new do |s|
'include/grpcpp/support/sync_stream.h',
'include/grpcpp/support/time.h',
'include/grpcpp/support/validate_service_config.h',
'include/grpcpp/version_info.h',
'include/grpcpp/xds_server_builder.h'
end

@ -58,6 +58,7 @@
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
#include <grpcpp/server_posix.h>
#include <grpcpp/version_info.h>
// IWYU pragma: end_exports
namespace grpc {

@ -0,0 +1,27 @@
// Copyright 2022 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/* This file is autogenerated from:
templates/include/grpcpp/version_info.h.template */
#ifndef GRPCPP_VERSION_INFO_H
#define GRPCPP_VERSION_INFO_H
#define GRPC_CPP_VERSION_MAJOR 1
#define GRPC_CPP_VERSION_MINOR 51
#define GRPC_CPP_VERSION_PATCH 0
#define GRPC_CPP_VERSION_TAG "dev"
#define GRPC_CPP_VERSION_STRING "1.51.0-dev"
#endif // GRPCPP_VERSION_INFO_H

@ -16,14 +16,11 @@
*
*/
/* This file is autogenerated from:
templates/src/cpp/common/version_cc.cc.template */
#include <string>
#include <grpcpp/grpcpp.h>
#include <grpcpp/support/config.h>
namespace grpc {
std::string Version() { return "1.51.0-dev"; }
std::string Version() { return GRPC_CPP_VERSION_STRING; }
} // namespace grpc

@ -0,0 +1,29 @@
%YAML 1.2
--- |
// Copyright 2022 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/* This file is autogenerated from:
templates/include/grpcpp/version_info.h.template */
#ifndef GRPCPP_VERSION_INFO_H
#define GRPCPP_VERSION_INFO_H
#define GRPC_CPP_VERSION_MAJOR ${settings.cpp_version.major}
#define GRPC_CPP_VERSION_MINOR ${settings.cpp_version.minor}
#define GRPC_CPP_VERSION_PATCH ${settings.cpp_version.patch}
#define GRPC_CPP_VERSION_TAG "${settings.cpp_version.tag or ''}"
#define GRPC_CPP_VERSION_STRING "${settings.cpp_version}"
#endif // GRPCPP_VERSION_INFO_H

@ -1,31 +0,0 @@
%YAML 1.2
--- |
/*
*
* Copyright 2016 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
/* This file is autogenerated from:
templates/src/cpp/common/version_cc.cc.template */
#include <string>
#include <grpcpp/grpcpp.h>
#include <grpcpp/support/config.h>
namespace grpc {
std::string Version() { return "${settings.cpp_version}"; }
} // namespace grpc

@ -1059,6 +1059,7 @@ include/grpcpp/support/stub_options.h \
include/grpcpp/support/sync_stream.h \
include/grpcpp/support/time.h \
include/grpcpp/support/validate_service_config.h \
include/grpcpp/version_info.h \
include/grpcpp/xds_server_builder.h
# This tag can be used to specify the character encoding of the source files

@ -1059,6 +1059,7 @@ include/grpcpp/support/stub_options.h \
include/grpcpp/support/sync_stream.h \
include/grpcpp/support/time.h \
include/grpcpp/support/validate_service_config.h \
include/grpcpp/version_info.h \
include/grpcpp/xds_server_builder.h \
src/core/ext/filters/census/grpc_context.cc \
src/core/ext/filters/channel_idle/channel_idle_filter.cc \

Loading…
Cancel
Save