forked from xmrig/xmrig-cuda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable algo options and full code omissions of disabled algos; Reacti…
…vates CUDA 8.0
- Loading branch information
Showing
7 changed files
with
228 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/CMakeLists.txt.user | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
set(DEVICE_COMPILER "nvcc") | ||
set(CUDA_COMPILER "${DEVICE_COMPILER}" CACHE STRING "Select the device compiler") | ||
|
||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
list(APPEND DEVICE_COMPILER "clang") | ||
endif() | ||
|
||
set_property(CACHE CUDA_COMPILER PROPERTY STRINGS "${DEVICE_COMPILER}") | ||
|
||
list(APPEND CMAKE_PREFIX_PATH "$ENV{CUDA_ROOT}") | ||
list(APPEND CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}") | ||
|
||
set(CUDA_STATIC ON) | ||
find_package(CUDA 8.0 REQUIRED) | ||
|
||
if (WITH_DRIVER_API) | ||
find_library(CUDA_LIB libcuda cuda HINTS "${CUDA_TOOLKIT_ROOT_DIR}/lib64" "${LIBCUDA_LIBRARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" /usr/lib64 /usr/local/cuda/lib64) | ||
find_library(CUDA_NVRTC_LIB libnvrtc nvrtc HINTS "${CUDA_TOOLKIT_ROOT_DIR}/lib64" "${LIBNVRTC_LIBRARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" /usr/lib64 /usr/local/cuda/lib64) | ||
|
||
set(LIBS ${LIBS} ${CUDA_LIBRARIES} ${CUDA_LIB} ${CUDA_NVRTC_LIB}) | ||
|
||
add_definitions(-DXMRIG_DRIVER_API) | ||
else() | ||
set(LIBS ${LIBS} ${CUDA_LIBRARIES}) | ||
|
||
remove_definitions(-DXMRIG_DRIVER_API) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.