set(PROTO_LIST
"${METADEF_PROTO_DIR}/op_mapping.proto"
"${METADEF_PROTO_DIR}/dump_task.proto"
)
generate_cann_protobuf(dump_proto PROTO_SRCS PROTO_HDRS ${PROTO_LIST} "--proto_path=${METADEF_PROTO_DIR}" TARGET)
add_library(profiler_stub SHARED src/profiler_stub.cc src/dump_stub.cc ${PROTO_SRCS})
foreach(runner_target ge_runner ge_runner_v2)
if (TARGET ${runner_target})
get_target_property(runner_link_libraries ${runner_target} LINK_LIBRARIES)
list(REMOVE_ITEM runner_link_libraries ascend_dump)
list(APPEND runner_link_libraries profiler_stub)
set_target_properties(${runner_target} PROPERTIES
LINK_LIBRARIES "${runner_link_libraries}"
)
endif()
endforeach()
add_dependencies(profiler_stub
dump_proto
)
target_compile_definitions(profiler_stub PRIVATE
google=ascend_private
)
target_link_libraries(profiler_stub
PRIVATE
intf_llt_pub
runtime_headers
c_sec
ascend_protobuf
mmpa
PUBLIC
msprof_headers
adump_headers
)
target_include_directories(profiler_stub SYSTEM PRIVATE
${AIR_CODE_DIR}/inc/framework
${METADEF_DIR}/inc/external
)
stub_module(profapi_share profiler_stub)
stub_module(msprofiler_fwk_share profiler_stub)
stub_module(ascend_dump profiler_stub)
stub_module(adump_server profiler_stub)
stub_module(adcore profiler_stub)