Skip to content

Commit

Permalink
CMake: Import OpenMP targets to global scope
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Dec 20, 2023
1 parent 6edc720 commit a3e7b6f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHOLMOD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ endif ( )
option ( SUITESPARSE_USE_OPENMP "ON (default): Use OpenMP if available. OFF: Do not use OpenMP" ON )
option ( CHOLMOD_USE_OPENMP "ON: Use OpenMP in CHOLMOD if available. OFF: Do not use OpenMP. (Default: SUITESPARSE_USE_OPENMP)" ${SUITESPARSE_USE_OPENMP} )
if ( CHOLMOD_USE_OPENMP )
find_package ( OpenMP )
find_package ( OpenMP GLOBAL )
else ( )
# OpenMP has been disabled
set ( OpenMP_C_FOUND OFF )
Expand Down
2 changes: 1 addition & 1 deletion GraphBLAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ endif ( )
option ( SUITESPARSE_USE_OPENMP "ON (default): Use OpenMP if available. OFF: Do not use OpenMP" ON )
option ( GRAPHBLAS_USE_OPENMP "ON: Use OpenMP in GraphBLAS if available. OFF: Do not use OpenMP. (Default: SUITESPARSE_USE_OPENMP)" ${SUITESPARSE_USE_OPENMP} )
if ( GRAPHBLAS_USE_OPENMP )
find_package ( OpenMP )
find_package ( OpenMP GLOBAL )
else ( )
# OpenMP has been disabled.
set ( OpenMP_C_FOUND OFF )
Expand Down
2 changes: 1 addition & 1 deletion LAGraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ if ( COVERAGE )
message ( STATUS "OpenMP disabled for test coverage" )
else ( )
if ( LAGRAPH_USE_OPENMP )
find_package ( OpenMP )
find_package ( OpenMP GLOBAL )
if ( OpenMP_C_FOUND AND BUILD_STATIC_LIBS )
list ( APPEND LAGRAPH_STATIC_LIBS ${OpenMP_C_LIBRARIES} )
endif ( )
Expand Down
2 changes: 1 addition & 1 deletion ParU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ option ( SUITESPARSE_USE_OPENMP "ON (default): Use OpenMP if available. OFF: Do
option ( PARU_USE_OPENMP "ON: Use OpenMP in ParU if available. OFF: Do not use OpenMP. (Default: SUITESPARSE_USE_OPENMP)" ${SUITESPARSE_USE_OPENMP} )
if ( PARU_USE_OPENMP )
# OpenMP 4.5 or later is required
find_package ( OpenMP )
find_package ( OpenMP GLOBAL )
if ( OpenMP_CXX_FOUND AND OpenMP_CXX_VERSION VERSION_LESS 4.5 )
set ( PARU_USE_OPENMP OFF )
endif ( )
Expand Down
2 changes: 1 addition & 1 deletion SuiteSparse_config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ endif ( )

option ( SUITESPARSE_USE_OPENMP "ON (default): Use OpenMP if available. OFF: Do not use OpenMP" ON )
if ( SUITESPARSE_USE_OPENMP )
find_package ( OpenMP )
find_package ( OpenMP GLOBAL )
else ( )
# OpenMP has been disabled
message ( STATUS "OpenMP disabled" )
Expand Down

0 comments on commit a3e7b6f

Please sign in to comment.