From a699c60900f8822b96eda2eef53f9b6322482f9d Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 13 Nov 2025 22:16:11 +0100 Subject: [PATCH] Use scipy-openblas only when building the Python extension 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. --- cmake/AmiciFindBLAS.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/AmiciFindBLAS.cmake b/cmake/AmiciFindBLAS.cmake index 37bb4c287e..3bcdd7b5f8 100644 --- a/cmake/AmiciFindBLAS.cmake +++ b/cmake/AmiciFindBLAS.cmake @@ -15,6 +15,11 @@ if(DEFINED ENV{AMICI_BLAS_USE_SCIPY_OPENBLAS}) "Using AMICI_BLAS_USE_SCIPY_OPENBLAS=${AMICI_BLAS_USE_SCIPY_OPENBLAS} from environment variable." ) set(AMICI_BLAS_USE_SCIPY_OPENBLAS $ENV{AMICI_BLAS_USE_SCIPY_OPENBLAS}) +elseif(NOT DEFINED AMICI_BLAS_USE_SCIPY_OPENBLAS + AND NOT AMICI_PYTHON_BUILD_EXT_ONLY) + # If were are not building the Python extension, it's unlikely that we want to + # use scipy-openblas + set(AMICI_BLAS_USE_SCIPY_OPENBLAS FALSE) endif() if((${BLAS} STREQUAL "MKL" OR DEFINED ENV{MKLROOT})