From bd05be94fb5557426542b0a6e4af76ee00a8ebad Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Fri, 11 Oct 2024 14:08:14 +0200 Subject: [PATCH 1/2] Update CMake export config We don't need to find SuiteSparse - sundials takes care of that --- cmake/AmiciConfig.cmake.in | 16 ---------------- python/sdist/amici/setup.template.py | 5 +---- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/cmake/AmiciConfig.cmake.in b/cmake/AmiciConfig.cmake.in index d760587766..a7b9315fa5 100644 --- a/cmake/AmiciConfig.cmake.in +++ b/cmake/AmiciConfig.cmake.in @@ -9,25 +9,9 @@ find_package(OpenMP) # tmpdirs. list(APPEND CMAKE_PREFIX_PATH @CMAKE_SOURCE_DIR@/ThirdParty/SuiteSparse/install/) -find_dependency(SuiteSparse_config REQUIRED) -find_dependency(AMD REQUIRED) -find_dependency(BTF REQUIRED) -find_dependency(COLAMD REQUIRED) -find_dependency(KLU REQUIRED) include("${CMAKE_CURRENT_LIST_DIR}/AmiciFindBLAS.cmake") -add_library(SUNDIALS::KLU INTERFACE IMPORTED) -target_link_libraries( - SUNDIALS::KLU - INTERFACE "${KLU_STATIC}" - INTERFACE "${COLAMD_STATIC}" - INTERFACE "${BTF_STATIC}" - INTERFACE "${AMD_STATIC}" - INTERFACE "${SUITESPARSE_CONFIG_STATIC}") -set_target_properties(SUNDIALS::KLU PROPERTIES INTERFACE_INCLUDE_DIRECTORIES - "${KLU_INCLUDE_DIR}") - find_dependency(SUNDIALS REQUIRED PATHS "@CMAKE_SOURCE_DIR@/ThirdParty/sundials/build/@CMAKE_INSTALL_LIBDIR@/cmake/sundials/") diff --git a/python/sdist/amici/setup.template.py b/python/sdist/amici/setup.template.py index 14edbfd2d4..539db46b8a 100644 --- a/python/sdist/amici/setup.template.py +++ b/python/sdist/amici/setup.template.py @@ -35,10 +35,7 @@ def get_extension() -> CMakeExtension: install_prefix="TPL_MODELNAME", cmake_configure_options=[ "-DCMAKE_VERBOSE_MAKEFILE=ON", - "-DCMAKE_MODULE_PATH=" - f"{prefix_path.as_posix()}/lib/cmake/SuiteSparse;" - f"{prefix_path.as_posix()}/lib64/cmake/SuiteSparse", - f"-DKLU_ROOT={prefix_path.as_posix()}", + f"-DCMAKE_PREFIX_PATH={prefix_path.as_posix()}", "-DAMICI_PYTHON_BUILD_EXT_ONLY=ON", f"-DPython3_EXECUTABLE={Path(sys.executable).as_posix()}", ], From fda36269a2da59f9d57087758545c8c166db67cc Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Mon, 14 Oct 2024 10:20:58 +0200 Subject: [PATCH 2/2] libsuitesparse-dev --- .github/workflows/test_python_cplusplus.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test_python_cplusplus.yml b/.github/workflows/test_python_cplusplus.yml index a74f407d00..23337986db 100644 --- a/.github/workflows/test_python_cplusplus.yml +++ b/.github/workflows/test_python_cplusplus.yml @@ -38,6 +38,11 @@ jobs: - name: Set up AMICI C++ libraries uses: ./.github/actions/setup-amici-cpp + - name: Install libsuitesparse-dev + # We don't need libsuitesparse-dev, but let's have it installed, + # to ensure that its presence does not break the build + run: sudo apt-get install -y libsuitesparse-dev + - name: C++ tests run: scripts/run-cpp-tests.sh