Skip to content

Commit

Permalink
joint ss build
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Sep 27, 2024
1 parent bc64433 commit 4b614b6
Showing 1 changed file with 11 additions and 58 deletions.
69 changes: 11 additions & 58 deletions python/sdist/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,78 +51,31 @@ def get_extensions():
] or os.getenv("ENABLE_GCOV_COVERAGE", "").lower() in ["1", "true"]
build_type = "Debug" if debug_build else "Release"

# SuiteSparse Config
suitesparse_config = CMakeExtension(
name="SuiteSparse_config",
# SuiteSparse
suitesparse = CMakeExtension(
name="SuiteSparse",
install_prefix="amici",
source_dir="amici/ThirdParty/SuiteSparse/SuiteSparse_config",
source_dir="amici/ThirdParty/SuiteSparse/",
cmake_build_type=build_type,
cmake_configure_options=[
*global_cmake_configure_options,
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
"-DBUILD_SHARED_LIBS=OFF",
"-DBUILD_TESTING=OFF",
# Building SuiteSparse_config does not require a BLAS
# we just set BLAS_LIBRARIES to skip the search,
# the value is not used
# "-DBLA_VENDOR=All",
"-DBLAS_LIBRARIES=dummy",
"-DSUITESPARSE_USE_64BIT_BLAS=ON",
"-DSUITESPARSE_ENABLE_PROJECTS=amd;btf;colamd;klu",
"-DSUITESPARSE_USE_CUDA=OFF",
"-DSUITESPARSE_USE_FORTRAN=OFF",
],
)
# SuiteSparse AMD
amd = CMakeExtension(
name="amd",
install_prefix="amici",
source_dir="amici/ThirdParty/SuiteSparse/AMD",
cmake_build_type=build_type,
cmake_configure_options=[
*global_cmake_configure_options,
"-DBUILD_SHARED_LIBS=OFF",
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
"-DSUITESPARSE_USE_FORTRAN=OFF",
],
)
# SuiteSparse BTF
btf = CMakeExtension(
name="btf",
install_prefix="amici",
source_dir="amici/ThirdParty/SuiteSparse/BTF",
cmake_build_type=build_type,
cmake_configure_options=[
*global_cmake_configure_options,
"-DSUITESPARSE_USE_FORTRAN=OFF",
"-DBUILD_SHARED_LIBS=OFF",
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
],
)
# SuiteSparse COLAMD
colamd = CMakeExtension(
name="colamd",
install_prefix="amici",
source_dir="amici/ThirdParty/SuiteSparse/COLAMD",
cmake_build_type=build_type,
cmake_configure_options=[
*global_cmake_configure_options,
"-DSUITESPARSE_USE_FORTRAN=OFF",
"-DBUILD_SHARED_LIBS=OFF",
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
],
)
# SuiteSparse KLU
klu = CMakeExtension(
name="klu",
install_prefix="amici",
source_dir="amici/ThirdParty/SuiteSparse/KLU",
cmake_build_type=build_type,
cmake_configure_options=[
*global_cmake_configure_options,
"-DSUITESPARSE_USE_PYTHON=OFF",
"-DSUITESPARSE_USE_OPENMP=OFF",
"-DSUITESPARSE_CONFIG_USE_OPENMP=OFF",
"-DCHOLMOD_CAMD=OFF",
"-DKLU_USE_CHOLMOD=OFF",
"-DSUITESPARSE_USE_CUDA=OFF",
"-DSUITESPARSE_USE_FORTRAN=OFF",
"-DBUILD_SHARED_LIBS=OFF",
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON",
],
)
cmake_prefix_path = os.getenv("CMAKE_PREFIX_PATH", "")
Expand Down Expand Up @@ -175,7 +128,7 @@ def get_extensions():
],
)
# Order matters!
return [suitesparse_config, amd, btf, colamd, klu, sundials, amici_ext]
return [suitesparse, sundials, amici_ext]


def main():
Expand Down

0 comments on commit 4b614b6

Please sign in to comment.