File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111build /
1212code_coverage /
1313
14+ # this file is auto-generated
15+ src /impl /version.h
16+
1417
Original file line number Diff line number Diff line change @@ -53,9 +53,7 @@ define_option(MILVUS_BUILD_COVERAGE "Build with coverage" OFF)
5353define_option_string (MILVUS_SDK_VERSION
5454 "Version for sdk"
5555 "2.0.0" )
56- define_option_string (MILVUS_SDK_RELEASE
57- "Release number for sdk"
58- "1" )
56+ configure_file (${CMAKE_CURRENT_SOURCE_DIR } /src/impl/version.h.in ${CMAKE_CURRENT_SOURCE_DIR } /src/impl/version.h @ONLY )
5957
6058set_option_category ("Thirdparty" )
6159# use thirdparty from:
Original file line number Diff line number Diff line change 2525
2626#include " MilvusInterceptor.h"
2727#include " grpcpp/security/credentials.h"
28+ #include " version.h"
2829
2930using grpc::Channel;
3031using grpc::ClientContext;
@@ -109,7 +110,7 @@ MilvusConnection::Connect(const ConnectParam& param) {
109110 auto client_info = rpc_request.mutable_client_info ();
110111 client_info->set_sdk_type (" CPP" );
111112 client_info->set_user (param.Username ());
112- client_info->set_sdk_version (" 2.4.0 " ); // TODO: automatically get this version
113+ client_info->set_sdk_version (MILVUS_SDK_VERSION );
113114 client_info->set_host (param.Host ());
114115
115116 auto now = std::chrono::system_clock::now ();
Original file line number Diff line number Diff line change 1+ // Licensed to the LF AI & Data foundation under one
2+ // or more contributor license agreements. See the NOTICE file
3+ // distributed with this work for additional information
4+ // regarding copyright ownership. The ASF licenses this file
5+ // to you under the Apache License, Version 2.0 (the
6+ // "License"); you may not use this file except in compliance
7+ // with the License. You may obtain a copy of the License at
8+ //
9+ // http://www.apache.org/licenses/LICENSE-2.0
10+ //
11+ // Unless required by applicable law or agreed to in writing, software
12+ // distributed under the License is distributed on an "AS IS" BASIS,
13+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ // See the License for the specific language governing permissions and
15+ // limitations under the License.
16+
17+ #cmakedefine MILVUS_SDK_VERSION "@MILVUS_SDK_VERSION@"
You can’t perform that action at this time.
0 commit comments