Skip to content

Commit

Permalink
fix for clients (openmp) (ROCm#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntrost57 authored Jun 29, 2020
1 parent 231c06c commit 3e4fef9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ option(BUILD_CUDA "Build hipSPARSE for CUDA" OFF)
include(cmake/Dependencies.cmake)

# Setup version
rocm_setup_version(VERSION 1.7.2)
rocm_setup_version(VERSION 1.7.3)
set(hipsparse_SOVERSION 0.1)

# hipSPARSE library
Expand Down
3 changes: 2 additions & 1 deletion clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ set(CMAKE_CXX_EXTENSIONS OFF)

# If OpenMP is available, we can use it to speed up some tests
find_package(OpenMP QUIET)
find_package(Threads QUIET)

if(OPENMP_FOUND)
if(OPENMP_FOUND AND THREADS_FOUND)
if(NOT TARGET OpenMP::OpenMP_CXX)
# OpenMP cmake fix for cmake <= 3.9
add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
Expand Down
2 changes: 1 addition & 1 deletion clients/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ target_include_directories(hipsparse-test PRIVATE $<BUILD_INTERFACE:${CMAKE_CURR
target_link_libraries(hipsparse-test PRIVATE GTest::GTest roc::hipsparse)

# Add OpenMP if available
if(OPENMP_FOUND)
if(OPENMP_FOUND AND THREADS_FOUND)
target_link_libraries(hipsparse-test PRIVATE OpenMP::OpenMP_CXX)
endif()

Expand Down

0 comments on commit 3e4fef9

Please sign in to comment.