You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
graphengine/ge/plugin/engine/CMakeLists.txt

58 lines
1.1 KiB

4 years ago
set(SRC_LIST
"dnnengines.cc"
"engine_manage.cc"
)
5 years ago
4 years ago
############ libengine.so ############
add_library(engine SHARED ${SRC_LIST})
5 years ago
4 years ago
target_compile_options(engine PRIVATE
-Werror
-fno-common
4 years ago
-fvisibility=hidden
4 years ago
)
5 years ago
target_compile_definitions(engine PRIVATE
4 years ago
REUSE_MEMORY=1
PROTOBUF_INLINE_NOT_IN_HEADERS=0
4 years ago
FUNC_VISIBILITY
4 years ago
)
target_include_directories(engine PRIVATE
${GE_CODE_DIR}/ge
${GE_CODE_DIR}/inc/
${GE_CODE_DIR}/inc/framework
${GE_CODE_DIR}/inc/framework/common
${GE_CODE_DIR}/inc/external
${METADEF_DIR}/inc
${METADEF_DIR}/inc/external
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/proto/ge
#### yellow zone ####
${GE_CODE_DIR}/../inc
#### blue zone ####
${GE_CODE_DIR}/third_party/fwkacllib/inc
4 years ago
)
4 years ago
target_link_options(engine PRIVATE
-Wl,-Bsymbolic
)
4 years ago
target_link_libraries(engine PRIVATE
$<BUILD_INTERFACE:intf_pub>
-Wl,--no-as-needed
4 years ago
c_sec
4 years ago
slog
-Wl,--as-needed
-lrt
-ldl
)
############ install ############
set(INSTALL_BASE_DIR "")
set(INSTALL_LIBRARY_DIR lib)
install(TARGETS engine OPTIONAL
LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
)