Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion projects/rocsparse/clients/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ else()
# if there is no omp.h to find the client compilation will fail and this should be obvious, used to be REQUIRED
find_package(OpenMP)
if (TARGET OpenMP::OpenMP_CXX)
set(ROCSPARSE_CLIENT_LIBS "OpenMP::OpenMP_CXX")
if(NOT WIN32)
set(ROCSPARSE_CLIENT_LIBS "OpenMP::OpenMP_CXX")
else()
set(ROCSPARSE_CLIENT_LIBS libomp)
Copy link

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using bare library name 'libomp' without target or path specification may cause linking failures. Consider using 'find_library(LIBOMP_LIB NAMES libomp)' and then '${LIBOMP_LIB}' or verify that this library is available in the default search paths on Windows.

Suggested change
set(ROCSPARSE_CLIENT_LIBS libomp)
find_library(LIBOMP_LIB NAMES libomp)
set(ROCSPARSE_CLIENT_LIBS ${LIBOMP_LIB})

Copilot uses AI. Check for mistakes.
endif()
endif()
endif()

Expand Down
2 changes: 2 additions & 0 deletions projects/rocsparse/clients/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ foreach(app ${ROCSPARSEIO_TOOLS_SOURCES})
# Internal common header
target_include_directories(${app} PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../common>)

target_link_libraries(${app} PRIVATE hip::host)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

target_link_libraries(${app} PRIVATE --rtlib=compiler-rt) maybe also works


# Set tools output directory
set_target_properties(${app} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging")

Expand Down