已合并
feat: 添加error_manager_headers,支持多仓联编 #1877
zhengfeiteng创建于 4月28日
feat: 添加error_manager_headers,支持多仓联编 #1877
已合并
共 3 个文件变更+20-1
| @@ -36,6 +36,8 @@ add_cann_subdirectories_relative(${RUNTIME_DIR} | |||
| 36 | ${RUNTIME_DIR}/cmake/stub | 36 | ${RUNTIME_DIR}/cmake/stub |
| 37 | ) | 37 | ) |
| 38 | 38 | ||
| 39 | +include(${RUNTIME_DIR}/src/dfx/error_manager/error_manager_headers.cmake) | ||
| 40 | + | ||
| 39 | add_dependencies(mmpa c_sec) | 41 | add_dependencies(mmpa c_sec) |
| 40 | add_dependencies(static_mmpa c_sec) | 42 | add_dependencies(static_mmpa c_sec) |
| 41 | add_dependencies(platform c_sec) | 43 | add_dependencies(platform c_sec) |
| @@ -17,6 +17,8 @@ set(SRC_LIST | |||
| 17 | "error_manager.cc" | 17 | "error_manager.cc" |
| 18 | ) | 18 | ) |
| 19 | 19 | ||
| 20 | +include(error_manager_headers.cmake) | ||
| 21 | + | ||
| 20 | ############ liberror_manager.so ############ | 22 | ############ liberror_manager.so ############ |
| 21 | add_library(error_manager SHARED ${SRC_LIST}) | 23 | add_library(error_manager SHARED ${SRC_LIST}) |
| 22 | 24 | ||
| @@ -28,7 +30,6 @@ target_compile_options(error_manager PRIVATE | |||
| 28 | 30 | ||
| 29 | target_include_directories(error_manager PRIVATE | 31 | target_include_directories(error_manager PRIVATE |
| 30 | ${CMAKE_CURRENT_LIST_DIR} | 32 | ${CMAKE_CURRENT_LIST_DIR} |
| 31 | - ${RUNTIME_DIR}/include/dfx | ||
| 32 | ) | 33 | ) |
| 33 | 34 | ||
| 34 | target_link_libraries(error_manager PRIVATE | 35 | target_link_libraries(error_manager PRIVATE |
| @@ -42,6 +43,8 @@ target_link_libraries(error_manager PRIVATE | |||
| 42 | json | 43 | json |
| 43 | $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> | 44 | $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> |
| 44 | -ldl | 45 | -ldl |
| 46 | + PUBLIC | ||
| 47 | + $<BUILD_INTERFACE:error_manager_headers> | ||
| 45 | ) | 48 | ) |
| 46 | 49 | ||
| 47 | set_target_properties(error_manager PROPERTIES | 50 | set_target_properties(error_manager PROPERTIES |
| @@ -0,0 +1,14 @@ | |||
| 1 | +# Copyright (c) 2026 Huawei Technologies Co., Ltd. | ||
| 2 | +# This program is free software, you can redistribute it and/or modify it under the terms and conditions of | ||
| 3 | +# CANN Open Software License Agreement Version 2.0 (the "License"). | ||
| 4 | +# Please refer to the License for details. You may not use this file except in compliance with the License. | ||
| 5 | +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, | ||
| 6 | +# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. | ||
| 7 | +# See LICENSE in the root of the software repository for the full text of the License. | ||
| 8 | +# =================================================================================================================== | ||
| 9 | + | ||
| 10 | +add_library(error_manager_headers INTERFACE) | ||
| 11 | + | ||
| 12 | +target_include_directories(error_manager_headers INTERFACE | ||
| 13 | + ${RUNTIME_DIR}/include/dfx | ||
| 14 | +) | ||