From 47c011665311d444b8443275c5df9fe9dd792451 Mon Sep 17 00:00:00 2001 From: liaogang Date: Mon, 7 Aug 2017 10:14:21 +0800 Subject: [PATCH] Import HPC linear algebra libs as cblas target --- cmake/external/openblas.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/external/openblas.cmake b/cmake/external/openblas.cmake index 60a10419364..4b13bf0f203 100644 --- a/cmake/external/openblas.cmake +++ b/cmake/external/openblas.cmake @@ -69,8 +69,13 @@ ENDIF(NOT ${CBLAS_FOUND}) MESSAGE(STATUS "BLAS library: ${CBLAS_LIBRARIES}") INCLUDE_DIRECTORIES(${CBLAS_INC_DIR}) -ADD_LIBRARY(cblas STATIC IMPORTED) -SET_PROPERTY(TARGET cblas PROPERTY IMPORTED_LOCATION ${CBLAS_LIBRARIES}) +# FIXME(gangliao): generate cblas target to track all high performance +# linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas) +SET(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/lib_any_dummy.c) +FILE(WRITE ${dummyfile} "const char * dummy_any = \"${dummyfile}\";") +ADD_LIBRARY(cblas STATIC ${dummyfile}) +TARGET_LINK_LIBRARIES(cblas ${CBLAS_LIBRARIES}) + IF(NOT ${CBLAS_FOUND}) ADD_DEPENDENCIES(cblas extern_openblas) LIST(APPEND external_project_dependencies cblas) -- GitLab