Skip to content

Commit

Permalink
adding libomp.so to rpath for clients (#85)
Browse files Browse the repository at this point in the history
* fix for clients: adding libomp.so to rpath

* bump version
  • Loading branch information
ntrost57 authored Jul 8, 2020
1 parent 079d13f commit 46af50d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ option(BUILD_VERBOSE "Output additional build information" OFF)
include(cmake/Dependencies.cmake)

# Setup version
set(VERSION_STRING "1.15.2")
set(VERSION_STRING "1.15.3")
rocm_setup_version(VERSION ${VERSION_STRING})
set(rocsparse_SOVERSION 0.1)

Expand Down
20 changes: 10 additions & 10 deletions clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

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

#if(OPENMP_FOUND)
# if(NOT TARGET OpenMP::OpenMP_CXX)
# # OpenMP cmake fix for cmake <= 3.9
# add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
# set_property(TARGET OpenMP::OpenMP_CXX PROPERTY INTERFACE_COMPILE_OPTIONS ${OpenMP_CXX_FLAGS})
# set_property(TARGET OpenMP::OpenMP_CXX PROPERTY INTERFACE_LINK_LIBRARIES ${OpenMP_CXX_FLAGS} Threads::Threads)
# endif()
#endif()
find_package(OpenMP QUIET)

if(OPENMP_FOUND)
if(NOT TARGET OpenMP::OpenMP_CXX)
# OpenMP cmake fix for cmake <= 3.9
add_library(OpenMP::OpenMP_CXX IMPORTED INTERFACE)
set_property(TARGET OpenMP::OpenMP_CXX PROPERTY INTERFACE_COMPILE_OPTIONS ${OpenMP_CXX_FLAGS})
set_property(TARGET OpenMP::OpenMP_CXX PROPERTY INTERFACE_LINK_LIBRARIES ${OpenMP_CXX_FLAGS} Threads::Threads)
endif()
endif()

if(BUILD_CLIENTS_SAMPLES)
add_subdirectory(samples)
Expand Down
2 changes: 1 addition & 1 deletion clients/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ target_link_libraries(rocsparse-bench PRIVATE Boost::program_options roc::rocspa

# Add OpenMP if available
if(OPENMP_FOUND)
target_link_libraries(rocsparse-bench PRIVATE OpenMP::OpenMP_CXX)
target_link_libraries(rocsparse-bench PRIVATE OpenMP::OpenMP_CXX -Wl,-rpath=${HIP_CLANG_ROOT}/lib)
endif()

# Set benchmark output directory
Expand Down
2 changes: 1 addition & 1 deletion clients/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ target_link_libraries(rocsparse-test PRIVATE GTest::GTest Boost::program_options

# Add OpenMP if available
if(OPENMP_FOUND)
target_link_libraries(rocsparse-test PRIVATE OpenMP::OpenMP_CXX)
target_link_libraries(rocsparse-test PRIVATE OpenMP::OpenMP_CXX -Wl,-rpath=${HIP_CLANG_ROOT}/lib)
endif()

# Set test output directory
Expand Down

0 comments on commit 46af50d

Please sign in to comment.