Skip to content

Commit 0e72520

Browse files
committed
Add cupti paths to INSTALL_RPATH.
1 parent b62c0d9 commit 0e72520

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cmake/NVBenchConfigTarget.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,15 @@ function(nvbench_config_target target_name)
7777
LIBRARY_OUTPUT_DIRECTORY "${NVBench_LIBRARY_OUTPUT_DIR}"
7878
RUNTIME_OUTPUT_DIRECTORY "${NVBench_EXECUTABLE_OUTPUT_DIR}"
7979
)
80+
# CUPTI libraries are installed in random locations depending on the platform
81+
# and installation method. Sometimes they're next to the CUDA libraries and in
82+
# the library path, other times they're in a subdirectory that isn't added to
83+
# the library path...
84+
# To simplify installed nvbench usage, add the CUPTI libraries path to the
85+
# installed nvbench rpath:
86+
if (NVBench_ENABLE_CUPTI AND nvbench_cupti_root)
87+
set_target_properties(${target_name} PROPERTIES
88+
INSTALL_RPATH "${nvbench_cupti_root}/lib64"
89+
)
90+
endif()
8091
endfunction()

0 commit comments

Comments
 (0)