diff --git a/CHOLMOD/CMakeLists.txt b/CHOLMOD/CMakeLists.txt index 44e160348..27c485f14 100644 --- a/CHOLMOD/CMakeLists.txt +++ b/CHOLMOD/CMakeLists.txt @@ -88,7 +88,7 @@ if ( NOT SUITESPARSE_USE_OPENMP ) set ( CHOLMOD_USE_OPENMP "OFF" CACHE STRING "" FORCE ) endif ( ) if ( CHOLMOD_USE_OPENMP ) - find_package ( OpenMP GLOBAL ) + find_package ( OpenMP COMPONENTS C GLOBAL ) else ( ) # OpenMP has been disabled set ( OpenMP_C_FOUND OFF ) diff --git a/CHOLMOD/Config/CHOLMODConfig.cmake.in b/CHOLMOD/Config/CHOLMODConfig.cmake.in index 5415d3214..602a0da63 100644 --- a/CHOLMOD/Config/CHOLMODConfig.cmake.in +++ b/CHOLMOD/Config/CHOLMODConfig.cmake.in @@ -53,7 +53,7 @@ endif ( ) # Look for OpenMP if ( @CHOLMOD_HAS_OPENMP@ AND NOT OpenMP_C_FOUND ) - find_dependency ( OpenMP ) + find_dependency ( OpenMP COMPONENTS C ) if ( NOT OpenMP_C_FOUND ) set ( _dependencies_found OFF ) endif ( ) diff --git a/GraphBLAS/CMakeLists.txt b/GraphBLAS/CMakeLists.txt index ab72d746b..2ad1527b2 100644 --- a/GraphBLAS/CMakeLists.txt +++ b/GraphBLAS/CMakeLists.txt @@ -105,7 +105,7 @@ if ( NOT SUITESPARSE_USE_OPENMP ) set ( GRAPHBLAS_USE_OPENMP "OFF" CACHE STRING "" FORCE ) endif ( ) if ( GRAPHBLAS_USE_OPENMP ) - find_package ( OpenMP GLOBAL ) + find_package ( OpenMP COMPONENTS C GLOBAL ) else ( ) # OpenMP has been disabled. set ( OpenMP_C_FOUND OFF ) diff --git a/GraphBLAS/Config/GraphBLASConfig.cmake.in b/GraphBLAS/Config/GraphBLASConfig.cmake.in index 76bf4273e..5e1777f94 100644 --- a/GraphBLAS/Config/GraphBLASConfig.cmake.in +++ b/GraphBLAS/Config/GraphBLASConfig.cmake.in @@ -63,7 +63,7 @@ endif ( ) # Look for OpenMP if ( @GRAPHBLAS_HAS_OPENMP@ AND NOT OpenMP_C_FOUND ) - find_dependency ( OpenMP ) + find_dependency ( OpenMP COMPONENTS C ) if ( NOT OpenMP_C_FOUND ) set ( _dependencies_found OFF ) endif ( ) diff --git a/GraphBLAS/GraphBLAS/CMakeLists.txt b/GraphBLAS/GraphBLAS/CMakeLists.txt index 5251f1207..a1e795b4d 100644 --- a/GraphBLAS/GraphBLAS/CMakeLists.txt +++ b/GraphBLAS/GraphBLAS/CMakeLists.txt @@ -69,7 +69,7 @@ if ( NOT SUITESPARSE_USE_OPENMP ) set ( GRAPHBLAS_USE_OPENMP "OFF" CACHE STRING "" FORCE ) endif ( ) if ( GRAPHBLAS_USE_OPENMP ) - find_package ( OpenMP ) + find_package ( OpenMP COMPONENTS C ) else ( ) # OpenMP has been disabled set ( OpenMP_C_FOUND OFF ) diff --git a/LAGraph/CMakeLists.txt b/LAGraph/CMakeLists.txt index 975582e66..9124db16b 100644 --- a/LAGraph/CMakeLists.txt +++ b/LAGraph/CMakeLists.txt @@ -167,7 +167,7 @@ if ( COVERAGE ) message ( STATUS "OpenMP disabled for test coverage" ) else ( ) if ( LAGRAPH_USE_OPENMP ) - find_package ( OpenMP GLOBAL ) + find_package ( OpenMP COMPONENTS C GLOBAL ) if ( OpenMP_C_FOUND AND BUILD_STATIC_LIBS ) list ( APPEND LAGRAPH_STATIC_LIBS ${OpenMP_C_LIBRARIES} ) endif ( ) diff --git a/LAGraph/config/LAGraphConfig.cmake.in b/LAGraph/config/LAGraphConfig.cmake.in index 96ae114d0..ffa6a0e34 100644 --- a/LAGraph/config/LAGraphConfig.cmake.in +++ b/LAGraph/config/LAGraphConfig.cmake.in @@ -53,7 +53,7 @@ endif ( ) # Look for OpenMP if ( @LAGRAPH_HAS_OPENMP@ AND NOT OpenMP_C_FOUND ) - find_dependency ( OpenMP ) + find_dependency ( OpenMP COMPONENTS C ) if ( NOT OpenMP_C_FOUND ) set ( _dependencies_found OFF ) endif ( ) diff --git a/ParU/CMakeLists.txt b/ParU/CMakeLists.txt index f6c10f87f..bf53a0d1f 100644 --- a/ParU/CMakeLists.txt +++ b/ParU/CMakeLists.txt @@ -61,7 +61,7 @@ endif ( ) if ( PARU_USE_OPENMP ) # OpenMP 4.5 or later is required - find_package ( OpenMP GLOBAL ) + find_package ( OpenMP COMPONENTS CXX GLOBAL ) if ( OpenMP_CXX_FOUND AND OpenMP_C_FOUND ) set ( PARU_HAS_OPENMP ON ) if (( OpenMP_CXX_VERSION VERSION_LESS 4.5 ) OR diff --git a/SuiteSparse_config/CMakeLists.txt b/SuiteSparse_config/CMakeLists.txt index f72cb7d83..f5bdafb27 100644 --- a/SuiteSparse_config/CMakeLists.txt +++ b/SuiteSparse_config/CMakeLists.txt @@ -70,7 +70,7 @@ if ( NOT SUITESPARSE_USE_OPENMP ) set ( SUITESPARSE_CONFIG_USE_OPENMP "OFF" CACHE STRING "" FORCE ) endif ( ) if ( SUITESPARSE_CONFIG_USE_OPENMP OR SUITESPARSE_USE_OPENMP ) - find_package ( OpenMP GLOBAL ) + find_package ( OpenMP COMPONENTS C GLOBAL ) else ( ) # OpenMP has been disabled set ( OpenMP_C_FOUND OFF ) diff --git a/SuiteSparse_config/Config/SuiteSparse_configConfig.cmake.in b/SuiteSparse_config/Config/SuiteSparse_configConfig.cmake.in index fd1a134fb..3cc163357 100644 --- a/SuiteSparse_config/Config/SuiteSparse_configConfig.cmake.in +++ b/SuiteSparse_config/Config/SuiteSparse_configConfig.cmake.in @@ -41,7 +41,7 @@ set ( _dependencies_found ON ) # Look for OpenMP if ( @SUITESPARSE_HAS_OPENMP@ AND NOT OpenMP_C_FOUND ) - find_dependency ( OpenMP ) + find_dependency ( OpenMP COMPONENTS C ) if ( NOT OpenMP_C_FOUND ) set ( _dependencies_found OFF ) endif ( )