fix bug of openblas library install fail (#2457)

* fix bug of openblas library install fail

Signed-off-by: cmli <chengming.li@zilliz.com>

* fix openblas install cmakelist error

Signed-off-by: cmli <chengming.li@zilliz.com>

Co-authored-by: cmli <chengming.li@zilliz.com>
pull/2469/head
op-hunter 2020-05-28 20:57:34 +08:00 committed by jinhai
parent 15b0867fef
commit cab9e5c2a6
3 changed files with 9 additions and 5 deletions

View File

@ -24,6 +24,7 @@ Please mark all change in change log and use the issue from GitHub
- \#2399 The nlist set by the user may not take effect
- \#2403 MySQL max_idle_time is 10 by default
- \#2450 The deleted vectors may be found on GPU
- \#2456 openblas library install failed
## Feature

View File

@ -18,6 +18,7 @@ include_directories(${MILVUS_THIRDPARTY_SRC})
include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-status)
include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-milvus)
set(FOUND_OPENBLAS "unknown")
add_subdirectory(index)
if (FAISS_WITH_MKL)
add_compile_definitions("WITH_MKL")
@ -333,10 +334,10 @@ install(FILES
${CMAKE_BINARY_DIR}/fiu_ep-prefix/src/fiu_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}fiu${CMAKE_SHARED_LIBRARY_SUFFIX}.1.00
DESTINATION lib)
if(EXISTS ${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/)
if (FOUND_OPENBLAS STREQUAL "false")
install(FILES
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}.0
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}.0.3
DESTINATION lib)
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}.0
${CMAKE_BINARY_DIR}/src/index/openblas_ep-prefix/src/openblas_ep/lib/${CMAKE_SHARED_LIBRARY_PREFIX}openblas${CMAKE_SHARED_LIBRARY_SUFFIX}.0.3
DESTINATION lib)
endif()

View File

@ -67,6 +67,7 @@ else()
endif()
if (OpenBLAS_FOUND)
set(FOUND_OPENBLAS "true" PARENT_SCOPE)
set(OpenBLAS_LIBRARIES ${OpenBLAS_LIB})
STRING(REGEX REPLACE "/libopenblas.so" "" OpenBLAS_LIB_DIR ${OpenBLAS_LIBRARIES})
message(STATUS "find OpenBLAS libraries:${OpenBLAS_LIBRARIES} ")
@ -78,6 +79,7 @@ else()
message(STATUS "Found OpenBLAS include: ${OpenBLAS_INCLUDE_DIR}")
endif()
else()
set(FOUND_OPENBLAS "false" PARENT_SCOPE)
if (OpenBLAS_FIND_REQUIRED)
message(FATAL_ERROR "Could not find OpenBLAS")
endif()