Skip to content

Commit

Permalink
SPEX: Use better default value for SPEX_USE_PYTHON
Browse files Browse the repository at this point in the history
Do not default to building Python interface if not building shared libraries.
  • Loading branch information
mmuetzel committed May 26, 2024
1 parent c0a87d5 commit 4dc20d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion SPEX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,13 @@ 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 )
Expand Down

0 comments on commit 4dc20d4

Please sign in to comment.