diff --git a/cmake/generic.cmake b/cmake/generic.cmake index fc2094b5077d64baf7f9d1611b00350646590641..9c42044ec163e9db1dd21d5c3915b010c30fdf1c 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})