Skip to content

Commit

Permalink
LAGraph: Link to OpenMP::OpenMP_C target
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Oct 20, 2023
1 parent 3e44355 commit b1a450c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 2 additions & 5 deletions LAGraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ find_package (GraphBLAS 7.0.1 REQUIRED MODULE)
if ( COVERAGE )
message ( STATUS "OpenMP disabled for test coverage" )
else ( )
include ( FindOpenMP )
include ( FindThreads )
if ( OPENMP_FOUND )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} " )
endif ( )
find_package ( OpenMP )
find_package ( Threads )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions LAGraph/experimental/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ target_link_directories ( lagraphx_static BEFORE PUBLIC ${CMAKE_SOURCE_DIR}/buil
#-------------------------------------------------------------------------------

if ( OPENMP_FOUND )
target_link_libraries ( lagraphx PUBLIC lagraph ${OpenMP_C_LIBRARIES} )
target_link_libraries ( lagraphx_static PUBLIC lagraph_static ${OpenMP_C_LIBRARIES} )
target_link_libraries ( lagraphx PUBLIC lagraph OpenMP::OpenMP_C )
target_link_libraries ( lagraphx_static PUBLIC lagraph_static OpenMP::OpenMP_C )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions LAGraph/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ target_link_directories( lagraph_static BEFORE PUBLIC ${CMAKE_SOURCE_DIR}/build
#-------------------------------------------------------------------------------

if ( OPENMP_FOUND )
target_link_libraries ( lagraph PUBLIC ${OpenMP_C_LIBRARIES} )
target_link_libraries ( lagraph_static PUBLIC ${OpenMP_C_LIBRARIES} )
target_link_libraries ( lagraph PUBLIC OpenMP::OpenMP_C )
target_link_libraries ( lagraph_static PUBLIC OpenMP::OpenMP_C )
endif ( )

#-------------------------------------------------------------------------------
Expand Down

0 comments on commit b1a450c

Please sign in to comment.