From 17c9e3d223ed249c4b7bd6adbe2b8dd1b30773e7 Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Wed, 20 Jun 2018 21:17:35 +0800 Subject: [PATCH] only deps mklml so, do not need link it --- cmake/generic.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/generic.cmake b/cmake/generic.cmake index 0e2df86c19..fc2094b507 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -195,6 +195,14 @@ function(cc_library TARGET_NAME) list(REMOVE_ITEM cc_library_DEPS warpctc) add_dependencies(${TARGET_NAME} warpctc) endif() + # Only deps libmklml.so, not link + if("${cc_library_DEPS};" MATCHES "mklml;") + list(REMOVE_ITEM cc_library_DEPS mklml) + if(NOT "${TARGET_NAME}" MATCHES "dynload_mklml") + list(APPEND cc_library_DEPS dynload_mklml) + endif() + add_dependencies(${TARGET_NAME} mklml) + endif() target_link_libraries(${TARGET_NAME} ${cc_library_DEPS}) add_dependencies(${TARGET_NAME} ${cc_library_DEPS}) endif() -- GitLab