未验证 提交 f73f5b06 编写于 作者: S Sing_chan 提交者: GitHub

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
上级 a094c4e7
...@@ -55,6 +55,7 @@ IF(NOT WIN32) ...@@ -55,6 +55,7 @@ IF(NOT WIN32)
INSTALL_COMMAND make install NO_SHARED=1 NO_LAPACK=1 PREFIX=<INSTALL_DIR> INSTALL_COMMAND make install NO_SHARED=1 NO_LAPACK=1 PREFIX=<INSTALL_DIR>
UPDATE_COMMAND "" UPDATE_COMMAND ""
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
BUILD_BYPRODUCTS ${CBLAS_LIBRARIES}
) )
ELSE(NOT WIN32) ELSE(NOT WIN32)
SET(CBLAS_LIBRARIES SET(CBLAS_LIBRARIES
...@@ -83,6 +84,8 @@ ELSE(NOT WIN32) ...@@ -83,6 +84,8 @@ ELSE(NOT WIN32)
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CBLAS_INSTALL_DIR} CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CBLAS_INSTALL_DIR}
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE} -DCMAKE_BUILD_TYPE:STRING=${THIRD_PARTY_BUILD_TYPE}
# ninja need to know where openblas.lib comes from
BUILD_BYPRODUCTS ${CBLAS_LIBRARIES}
) )
SET(OPENBLAS_SHARED_LIB ${CBLAS_INSTALL_DIR}/bin/openblas${CMAKE_SHARED_LIBRARY_SUFFIX}) SET(OPENBLAS_SHARED_LIB ${CBLAS_INSTALL_DIR}/bin/openblas${CMAKE_SHARED_LIBRARY_SUFFIX})
ENDIF(NOT WIN32) ENDIF(NOT WIN32)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册