Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphBLAS: Check if C standard function "system" can be used #836

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion GraphBLAS/cmake_modules/GraphBLAS_JIT_paths.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,20 @@ if ( SUITESPARSE_HAS_CUDA AND GRAPHBLAS_USE_CUDA )
# set ( GRAPHBLAS_COMPACT on ) # FIXME
endif ( )

include ( CheckSymbolExists )
check_symbol_exists ( system "stdlib.h" HAVE_C_SYSTEM )

option ( GRAPHBLAS_COMPACT "ON: do not compile FactoryKernels. OFF (default): compile FactoryKernels" OFF )
option ( GRAPHBLAS_USE_JIT "ON (default): use the CPU JIT. OFF: do not use the CPU JIT" ON )
option ( GRAPHBLAS_USE_JIT "ON (default): use the CPU JIT. OFF: do not use the CPU JIT" ${HAVE_C_SYSTEM} )

if ( GRAPHBLAS_USE_JIT AND NOT HAVE_C_SYSTEM )
mmuetzel marked this conversation as resolved.
Show resolved Hide resolved
if ( SUITESPARSE_USE_STRICT )
message ( FATAL_ERROR "GRAPHBLAS CPU JIT cannot be built without support for the C standard function 'system'." )
else ( )
message ( STATUS "C standard function 'system' cannot be used. GRAPHBLAS CPU JIT will be disabled." )
set ( GRAPHBLAS_USE_JIT OFF CACHE BOOL "ON (default): use the CPU JIT. OFF: do not use the CPU JIT" FORCE )
endif ( )
endif ( )

if ( GRAPHBLAS_USE_JIT )
message ( STATUS "GraphBLAS CPU JIT: enabled")
Expand Down