Skip to content

Commit f73f5b0

Browse files
authored
fix bug when use extern_openblas and generator is ninja (#39428)
* fix bug when use extern_openblas and generator is ninja * modify according to zhouwei's comment
1 parent a094c4e commit f73f5b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/external/openblas.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ IF(NOT WIN32)
5555
INSTALL_COMMAND make install NO_SHARED=1 NO_LAPACK=1 PREFIX=<INSTALL_DIR>
5656
UPDATE_COMMAND ""
5757
CONFIGURE_COMMAND ""
58+
BUILD_BYPRODUCTS ${CBLAS_LIBRARIES}
5859
)
5960
ELSE(NOT WIN32)
6061
SET(CBLAS_LIBRARIES
@@ -83,6 +84,8 @@ ELSE(NOT WIN32)
8384
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CBLAS_INSTALL_DIR}
8485
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
8586
-DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
87+
# ninja need to know where openblas.lib comes from
88+
BUILD_BYPRODUCTS ${CBLAS_LIBRARIES}
8689
)
8790
SET(OPENBLAS_SHARED_LIB ${CBLAS_INSTALL_DIR}/bin/openblas${CMAKE_SHARED_LIBRARY_SUFFIX})
8891
ENDIF(NOT WIN32)

0 commit comments

Comments
 (0)