Skip to content

Commit d1225e3

Browse files
authored
Merge pull request #13714 from JiabinYang/fix/blas_include_1.0
Fix/blas include 1.0
2 parents d9da681 + ecbe0da commit d1225e3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmake/cblas.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ set(OPENBLAS_LIB_SEARCH_PATHS
4040
/usr/local/opt/openblas/lib)
4141

4242
find_path(OPENBLAS_INC_DIR NAMES cblas.h
43-
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS})
43+
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH)
4444
find_path(OPENBLAS_LAPACKE_INC_DIR NAMES lapacke.h
4545
PATHS ${OPENBLAS_INCLUDE_SEARCH_PATHS})
4646
find_library(OPENBLAS_LIB NAMES openblas

cmake/external/openblas.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ IF(NOT ${CBLAS_FOUND})
2727

2828
SET(CBLAS_SOURCES_DIR ${THIRD_PARTY_PATH}/openblas)
2929
SET(CBLAS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/openblas)
30-
SET(CBLAS_INCLUDE_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
30+
SET(CBLAS_INC_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
3131

3232
SET(CBLAS_LIBRARIES
3333
"${CBLAS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}openblas${CMAKE_STATIC_LIBRARY_SUFFIX}"
@@ -96,7 +96,7 @@ IF(NOT ${CBLAS_FOUND})
9696
ENDIF(NOT WIN32)
9797
SET(CBLAS_PROVIDER openblas)
9898
IF(WITH_C_API)
99-
INSTALL(DIRECTORY ${CBLAS_INCLUDE_DIR} DESTINATION third_party/openblas)
99+
INSTALL(DIRECTORY ${CBLAS_INC_DIR} DESTINATION third_party/openblas)
100100
# Because libopenblas.a is a symbolic link of another library, thus need to
101101
# install the whole directory.
102102
IF(ANDROID)
@@ -117,8 +117,8 @@ IF(NOT ${CBLAS_FOUND})
117117
ENDIF(NOT ${CBLAS_FOUND})
118118

119119
MESSAGE(STATUS "BLAS library: ${CBLAS_LIBRARIES}")
120-
MESSAGE(STATUS "BLAS Include: ${CBLAS_INCLUDE_DIR}")
121-
INCLUDE_DIRECTORIES(${CBLAS_INCLUDE_DIR})
120+
MESSAGE(STATUS "BLAS Include: ${CBLAS_INC_DIR}")
121+
INCLUDE_DIRECTORIES(${CBLAS_INC_DIR})
122122

123123
# FIXME(gangliao): generate cblas target to track all high performance
124124
# linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)

0 commit comments

Comments
 (0)