Skip to content

Commit

Permalink
GraphBLAS JIT configure: MINGW vs Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Dec 2, 2023
1 parent fc26ba4 commit c458115
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions GraphBLAS/cmake_modules/GraphBLAS_JIT_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ else ( )
endif ( )

# construct the library list
if ( MINGW )

# This might be something like:
# /usr/lib/libgomp.so;/usr/lib/libpthread.a;m
# convert to -l flags to avoid relocation issues, i.e.: "-lgomp -lpthread -lm"
Expand All @@ -80,6 +82,22 @@ foreach ( _lib ${GB_CMAKE_LIBRARIES} )
endforeach ( )
endforeach ( )

else ( )

# original method (before MINGW changes:
string ( REPLACE "." "\\." LIBSUFFIX1 ${GB_LIB_SUFFIX} )
string ( REPLACE "." "\\." LIBSUFFIX2 ${CMAKE_STATIC_LIBRARY_SUFFIX} )
set ( GB_C_LIBRARIES "" )
foreach ( LIB_NAME ${GB_CMAKE_LIBRARIES} )
if (( LIB_NAME MATCHES ${LIBSUFFIX1} ) OR ( LIB_NAME MATCHES ${LIBSUFFIX2} ))
string ( APPEND GB_C_LIBRARIES " " ${LIB_NAME} )
else ( )
string ( APPEND GB_C_LIBRARIES " -l" ${LIB_NAME} )
endif ( )
endforeach ( )

endif ( )

if ( NOT NJIT OR ENABLE_CUDA )
message ( STATUS "------------------------------------------------------------------------" )
message ( STATUS "JIT configuration:" )
Expand Down

0 comments on commit c458115

Please sign in to comment.