Skip to content

Commit

Permalink
improves robustness of nvml detection when using native cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiaswagner committed Dec 5, 2017
1 parent 5d34631 commit a0a8cb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/FindNVML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ else()
endif()
endif()

find_library(NVML_LIBRARY NAMES ${NVML_NAMES} PATHS ${NVML_LIB_PATHS} HINTS ${CUDA_TOOLKIT_ROOT_DIR}/lib ${CUDA_TOOLKIT_ROOT_DIR}/lib64 PATH_SUFFIXES stubs)
find_library(NVML_LIBRARY NAMES ${NVML_NAMES} PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} ${NVML_LIB_PATHS} HINTS ${CUDA_TOOLKIT_ROOT_DIR}/lib ${CUDA_TOOLKIT_ROOT_DIR}/lib64 PATH_SUFFIXES stubs)

find_path(NVML_INCLUDE_DIR nvml.h PATHS ${NVML_INC_PATHS})
find_path(NVML_INCLUDE_DIR nvml.h PATHS ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES} ${NVML_INC_PATHS})

# handle the QUIETLY and REQUIRED arguments and set NVML_FOUND to TRUE if
# all listed variables are TRUE
Expand Down

0 comments on commit a0a8cb6

Please sign in to comment.