Skip to content

Commit

Permalink
Merge pull request #819 from DrTimothyAldenDavis/dev2
Browse files Browse the repository at this point in the history
sync with dev2
  • Loading branch information
DrTimothyAldenDavis authored May 29, 2024
2 parents a77a225 + fb5afcc commit bb783e7
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 14 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build-arch-emu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,22 @@ jobs:
matrix:
# For available CPU architectures, see:
# https://github.com/marketplace/actions/setup-alpine-linux-environment
arch: [x86, aarch64, armv7, ppc64le, s390x]
arch: [x86, aarch64, armv7, ppc64le, s390x, riscv64]
include:
- arch: x86
ccache-max: 80M
ccache-max: 64M
extra-build-libs: ":GraphBLAS:LAGraph"
extra-check-libs: ":GraphBLAS:LAGraph"
- arch: aarch64
ccache-max: 42M
ccache-max: 28M
- arch: armv7
ccache-max: 42M
ccache-max: 25M
- arch: ppc64le
ccache-max: 45M
ccache-max: 28M
- arch: s390x
ccache-max: 42M
ccache-max: 28M
- arch: riscv64
ccache-max: 28M

name: alpine (${{ matrix.arch }})

Expand Down Expand Up @@ -76,11 +78,11 @@ jobs:
mpfr-dev
lapack-dev
python3
valgrind
util-linux-misc
autoconf
automake
libtool
# ${{ matrix.arch != 'riscv64' && 'valgrind' || '' }}

- name: get CPU information (emulated)
run: lscpu
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ 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 )

# control the use of Python interfaces in SuiteSparse packages (currently only
# for SPEX)
option ( SUITESPARSE_USE_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 )
Expand Down
26 changes: 23 additions & 3 deletions SPEX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,27 @@ endif ( )
# SPEX_USE_PYTHON (for just SPEX) or SUITESPARSE_USE_PYTHON (for all of
# SuiteSparse). Currently, only SPEX has a Python interface in SuiteSparse.

option ( SPEX_USE_PYTHON "ON (default): build Python interface for SPEX. OFF: do not build Python interface for SPEX" ${SUITESPARSE_USE_PYTHON} )
if ( BUILD_SHARED_LIBS )
set ( _spex_use_python_default ${SUITESPARSE_USE_PYTHON} )
else ( )
set ( _spex_use_python_default OFF )
endif ( )

option ( SPEX_USE_PYTHON "ON (default if building shared libraries): build Python interface for SPEX. OFF (default if not building shared libraries): do not build Python interface for SPEX" ${_spex_use_python_default} )

if ( SPEX_USE_PYTHON AND BUILD_SHARED_LIBS )
set ( SPEX_HAS_PYTHON ON )
else ( )
set ( SPEX_HAS_PYTHON OFF )
endif ( )
message ( STATUS "SPEX with Python interface: ${SPEX_HAS_PYTHON}" )

# check for strict usage
if ( SUITESPARSE_USE_STRICT AND SPEX_USE_PYTHON AND NOT SPEX_HAS_PYTHON )
message ( FATAL_ERROR "Python interface for SPEX requires building shared libraries" )
endif ( )

if ( BUILD_SHARED_LIBS AND SPEX_USE_PYTHON)
if ( SPEX_HAS_PYTHON )

file ( GLOB SPEX_PYTHON_SOURCES "Python/SPEXpy/Source/*.c" )
add_library ( spexpython SHARED ${SPEX_PYTHON_SOURCES} )
Expand All @@ -427,7 +445,8 @@ if ( BUILD_SHARED_LIBS AND SPEX_USE_PYTHON)
C_STANDARD 11
C_STANDARD_REQUIRED ON
SOVERSION ${SPEX_VERSION_MAJOR}
PUBLIC_HEADER "Python/SPEXpy/Source/spex_python_connect.h" )
PUBLIC_HEADER "Python/SPEXpy/Source/spex_python_connect.h"
WINDOWS_EXPORT_ALL_SYMBOLS ON )

# MPFR:
target_link_libraries ( spexpython PRIVATE ${MPFR_LIBRARIES} )
Expand All @@ -445,6 +464,7 @@ if ( BUILD_SHARED_LIBS AND SPEX_USE_PYTHON)
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR}
RUNTIME DESTINATION ${SUITESPARSE_BINDIR}
PUBLIC_HEADER DESTINATION ${SUITESPARSE_INCLUDEDIR} )

endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
# Use OpenMP
option ( SUITESPARSE_USE_OPENMP "ON (default): Use OpenMP in libraries by default if available. OFF: Do not use OpenMP by default." ON )

# control the use of Python interfaces in SuiteSparse packages (currently only
# for SPEX)
option ( SUITESPARSE_USE_PYTHON "ON (default): build Python interfaces for SuiteSparse packages (SPEX). OFF: do not build Python interfaces for SuiteSparse packages" ON )

# strict usage
option ( SUITESPARSE_USE_STRICT "ON: treat all _USE__ settings as strict if they are ON. OFF (default): consider *_USE_* as preferences, not strict" OFF )

Expand Down

0 comments on commit bb783e7

Please sign in to comment.