Skip to content

Commit

Permalink
fix: improve FindNVML.cmake
Browse files Browse the repository at this point in the history
Signed-off-by: ito-san <[email protected]>
  • Loading branch information
ito-san committed Dec 16, 2024
1 parent 6eb5fd3 commit 57706f7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions system/system_monitor/cmake/FindNVML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,24 @@
# NVML_FOUND - True if NVML found.

if(NOT NVML_INCLUDE_DIRS)
find_path(NVML_INCLUDE_DIRS nvml.h PATHS /usr/local/cuda/include)
find_path(NVML_INCLUDE_DIRS nvml.h
PATHS
/usr/local/cuda/include
/usr/include
/usr/local/include
)
endif()

# NVML library
if(NOT NVML_LIBRARIES)
find_library(NVML_LIBRARIES NAMES nvidia-ml)
find_library(NVML_LIBRARIES NAMES nvidia-ml
PATHS
/usr/lib
/usr/lib64
/usr/lib/x86_64-linux-gnu
/usr/local/lib
/usr/local/lib64
)
endif()

include(FindPackageHandleStandardArgs)
Expand Down

0 comments on commit 57706f7

Please sign in to comment.