From abb77c8ff0ef92e0c9fccae3f84068ed243f1154 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Fri, 16 Oct 2020 16:00:08 +0800 Subject: [PATCH] add ascendcl cmakelis --- ge/CMakeLists.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index 6141acb1..c20d873b 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -704,6 +704,42 @@ target_link_libraries(ge_compiler -ldl ) +############ libascendcl.so ############ +add_library(opensrc_ascendc SHARED ${DUMMY_OBJ}) + +target_link_libraries(opensrc_ascendcl PRIVATE + -Wl, --whole-archive + ge_executor + ascendcl_static + ge_common_static + graph_static + protobuf_static + register_static + error_manager_static + adump_server + msprofiler + -Wl, --no-whole-archive + -Wl, --no-as-needed + c_sec + runtime + mmpa + slog + msprof + ascend_hal_stub + -Wl, --as-needed + $<$>:-lrt> + -ldl + $<$:-llog> + json +) + +set_target_properties(opensrc_ascendc PROPERTIES + OUTPUT_NAME ascendcl +) + +file(GENERATE OUTPUT ${CMAKE_BINARY_DIR}/dummy.c CONTENT "") +add_library(dummy_obj OBJECT ${CMAKE_BINARY_DIR}/dummy.c) +set(DUMMY_OBJ $) ################################################################## add_custom_command(