# -----------------------------------------------------------------------------------------------------------
# Copyright (c) 2025 Huawei Technologies Co., Ltd.
# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
# CANN Open Software License Agreement Version 2.0 (the "License").
# Please refer to the License for details. You may not use this file except in compliance with the License.
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
# See LICENSE in the root of the software repository for the full text of the License.
# -----------------------------------------------------------------------------------------------------------
# NOTICE !! PROTOBUF VERSION CHANGE MAY REDEFINED THESE GLOBAL VARIABLES
# The content of `PROTOBUF_SYM_RENAME` is auto generated by the step:
# 1. goto the code root
# 2. cd open_source/protobuf && mkdir objects && cd objects && cmake ../cmake/ -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_SHARED_LIBS=1 && make -j16
# 3. readelf --dyn-syms -W libascend_protobuf.so.3.13.0.0 |grep GLOBAL |grep DEFAULT |grep OBJECT |grep -v _ZN | grep -v UND | awk '{print "-D"$8"="$8"_25_1_0 \\"}'
# 4. notes, please change protobuf version 3.13.0.0 and 25_1_0 in the command parameter of readelf
# need help : wangkai86@huawei.com
set(PROTOBUF_SYM_RENAME " \
-Ddescriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto=descriptor_table_google_2fprotobuf_2fsource_5fcontext_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto=descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2fdescriptor_2eproto=descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2fapi_2eproto=descriptor_table_google_2fprotobuf_2fapi_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2fempty_2eproto=descriptor_table_google_2fprotobuf_2fempty_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2fstruct_2eproto=descriptor_table_google_2fprotobuf_2fstruct_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2ftimestamp_2eproto=descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2fany_2eproto=descriptor_table_google_2fprotobuf_2fany_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2fwrappers_2eproto=descriptor_table_google_2fprotobuf_2fwrappers_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2fduration_2eproto=descriptor_table_google_2fprotobuf_2fduration_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto=descriptor_table_google_2fprotobuf_2fcpp_5ffeatures_2eproto_25_1_0 \
-Ddescriptor_table_google_2fprotobuf_2ftype_2eproto=descriptor_table_google_2fprotobuf_2ftype_2eproto_25_1_0 "
)