File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -169,9 +169,35 @@ if(${BLAS} STREQUAL "MKL" OR DEFINED ENV{MKLROOT})
169169 -lmkl
170170 CACHE STRING "" )
171171 endif ()
172- elseif (NOT DEFINED ENV{BLAS_LIBS} AND NOT DEFINED ENV{BLAS_CFLAGS})
172+ elseif (
173+ NOT DEFINED ENV{BLAS_LIBS}
174+ AND NOT DEFINED ENV{BLAS_CFLAGS}
175+ AND NOT BLAS_FOUND)
173176 # if nothing is specified via environment variables, let's try FindBLAS
174- find_package (BLAS)
177+ if ($(CMAKE_VERSION ) VERSION_GREATER_EQUAL 3.22)
178+ set (BLA_SIZEOF_INTEGER 8)
179+ endif ()
180+
181+ if (APPLE AND (NOT DEFINED BLA_VENDOR OR BLA_VENDOR STREQUAL "All" ))
182+ set (BLA_VENDOR Apple )
183+ find_package (BLAS)
184+ if (BLAS_FOUND)
185+ set_property (
186+ TARGET BLAS::BLAS
187+ APPEND
188+ PROPERTY INTERFACE_COMPILE_DEFINITIONS ACCELERATE_NEW_LAPACK)
189+ set_property (
190+ TARGET BLAS::BLAS
191+ APPEND
192+ PROPERTY INTERFACE_COMPILE_DEFINITIONS ACCELERATE_LAPACK_ILP64)
193+ else ()
194+ set (BLA_VENDOR "All" )
195+ endif ()
196+
197+ endif ()
198+ if (NOT BLAS_FOUND)
199+ find_package (BLAS)
200+ endif ()
175201 if (NOT BLAS_FOUND)
176202 # Nothing specified by the user and FindBLAS didn't find anything; let's try
177203 # if cblas is available on the system paths.
You can’t perform that action at this time.
0 commit comments