diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bee05191..07fa4d6a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,8 @@ option ( UMFPACK_USE_CHOLMOD "ON (default): use CHOLMOD in UMFPACK. OFF: do not # library takes a long time option ( GRAPHBLAS_BUILD_STATIC_LIBS "OFF (default): Do not build static libraries for GraphBLAS project. ON: Use same value of BUILD_STATIC_LIBS for GraphBLAS like in the other projects" OFF ) +option ( SUITESPARSE_PYTHON "ON (default): build Python interfaces for SuiteSparse packages (SPEX). OFF: do not build Python interfaces for SuiteSparse packages" ON ) + # options to build with libraries installed on the system instead of building # dependencies automatically option ( SUITESPARSE_USE_SYSTEM_BTF "ON: use BTF libraries installed on the build system. OFF (default): Automatically build BTF as dependency if needed." OFF ) diff --git a/SPEX/CMakeLists.txt b/SPEX/CMakeLists.txt index b9a3929b9..455a8bcb8 100644 --- a/SPEX/CMakeLists.txt +++ b/SPEX/CMakeLists.txt @@ -410,8 +410,8 @@ endif ( ) #------------------------------------------------------------------------------- # python interface #------------------------------------------------------------------------------- - -if ( BUILD_SHARED_LIBS ) +option ( SPEX_PYTHON "ON (default): build Python interface for SPEX. OFF: do not build Python interface for SPEX" ${SUITESPARSE_PYTHON} ) +if ( BUILD_SHARED_LIBS AND SPEX_PYTHON) file ( GLOB SPEX_PYTHON_SOURCES "Python/SPEXpy/Source/*.c" ) add_library ( spexpython SHARED ${SPEX_PYTHON_SOURCES} )