Skip to content

Commit 27d4d38

Browse files
authored
Use scipy-openblas only when building the Python extension (#3033)
Fixes a flaw in `cmake/AmiciFindBLAS.cmake` that resulted in incorrectly trying to use scipy-openblas during standalone C++ builds. Now, unless explicitly requested, scipy-openblas will only be considered when building (only) the Python extension.
1 parent 3b25598 commit 27d4d38

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/AmiciFindBLAS.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ if(DEFINED ENV{AMICI_BLAS_USE_SCIPY_OPENBLAS})
1515
"Using AMICI_BLAS_USE_SCIPY_OPENBLAS=${AMICI_BLAS_USE_SCIPY_OPENBLAS} from environment variable."
1616
)
1717
set(AMICI_BLAS_USE_SCIPY_OPENBLAS $ENV{AMICI_BLAS_USE_SCIPY_OPENBLAS})
18+
elseif(NOT DEFINED AMICI_BLAS_USE_SCIPY_OPENBLAS
19+
AND NOT AMICI_PYTHON_BUILD_EXT_ONLY)
20+
# If were are not building the Python extension, it's unlikely that we want to
21+
# use scipy-openblas
22+
set(AMICI_BLAS_USE_SCIPY_OPENBLAS FALSE)
1823
endif()
1924

2025
if((${BLAS} STREQUAL "MKL" OR DEFINED ENV{MKLROOT})

0 commit comments

Comments
 (0)