From f73f5b065f3d82777e990303225ce607614f9e7a Mon Sep 17 00:00:00 2001 From: Sing_chan <51314274+betterpig@users.noreply.github.com> Date: Tue, 15 Feb 2022 11:03:18 +0800 Subject: [PATCH] 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 --- cmake/external/openblas.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/external/openblas.cmake b/cmake/external/openblas.cmake index e9180c4fc9b..b0998317385 100644 --- a/cmake/external/openblas.cmake +++ b/cmake/external/openblas.cmake @@ -55,6 +55,7 @@ IF(NOT WIN32) INSTALL_COMMAND make install NO_SHARED=1 NO_LAPACK=1 PREFIX= UPDATE_COMMAND "" CONFIGURE_COMMAND "" + BUILD_BYPRODUCTS ${CBLAS_LIBRARIES} ) ELSE(NOT WIN32) SET(CBLAS_LIBRARIES @@ -83,6 +84,8 @@ ELSE(NOT WIN32) CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CBLAS_INSTALL_DIR} -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -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}) ENDIF(NOT WIN32) -- GitLab