Skip to content

Commit

Permalink
Update CMake export config
Browse files Browse the repository at this point in the history
We don't need to find SuiteSparse - sundials takes care of that
  • Loading branch information
dweindl committed Oct 11, 2024
1 parent ca01930 commit bd05be9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
16 changes: 0 additions & 16 deletions cmake/AmiciConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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/")

Expand Down
5 changes: 1 addition & 4 deletions python/sdist/amici/setup.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}",
],
Expand Down

0 comments on commit bd05be9

Please sign in to comment.