Skip to content

Commit

Permalink
Enable NVTX in cuvs-cagra-search component (#439)
Browse files Browse the repository at this point in the history
Since parts of CAGRA code have been separated into a static library component `cuvs-cagra-search` (to selectively enable CUDA separable compilation on them), the NVTX flags are not passed to the affected sources anymore. This PR fixes that.

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Micka (https://github.com/lowener)

URL: #439
  • Loading branch information
achirkin authored Oct 31, 2024
1 parent b422cbe commit 6041a81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ SECTIONS
# This enables NVTX within the project with no option to disable it downstream.
target_link_libraries(cuvs PUBLIC CUDA::nvtx3)
target_compile_definitions(cuvs PUBLIC NVTX_ENABLED)

target_link_libraries(cuvs-cagra-search PUBLIC CUDA::nvtx3)
target_compile_definitions(cuvs-cagra-search PUBLIC NVTX_ENABLED)
else()
# Allow enable NVTX downstream if not set here. This creates a new option at build/install time,
# which is set by default to OFF, but can be enabled in the dependent project.
Expand Down

0 comments on commit 6041a81

Please sign in to comment.