From c475041405e55d0a587358823387af4b70303ba5 Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Thu, 21 Jun 2018 13:41:31 +0800 Subject: [PATCH] link iomp as needed --- cmake/generic.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/generic.cmake b/cmake/generic.cmake index fc2094b5077..9c42044ec16 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -202,6 +202,7 @@ function(cc_library TARGET_NAME) list(APPEND cc_library_DEPS dynload_mklml) endif() add_dependencies(${TARGET_NAME} mklml) + target_link_libraries(${TARGET_NAME} "-L${MKLML_LIB_DIR} -liomp5 -Wl,--as-needed") endif() target_link_libraries(${TARGET_NAME} ${cc_library_DEPS}) add_dependencies(${TARGET_NAME} ${cc_library_DEPS}) -- GitLab