Professional Documents
Culture Documents
CMake Lists
CMake Lists
12)
project(xmrig-cuda)
include(cmake/CUDA-Version.cmake)
option(WITH_DRIVER_API "Enable CUDA Driver API and NVRTC, required for cn/r and
kawpow algorithms" ON)
# Algorithm selection
option(WITH_CN_R "Enable CryptoNight-R algorithm" ON)
option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON)
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON)
option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
option(WITH_CN_FEMTO "Enable CryptoNight-UPX2 algorithm" ON)
option(WITH_ARGON2 "Enable Argon2 algorithms family" OFF) #unsupported
if (WITH_CN_LITE)
add_definitions(/DXMRIG_ALGO_CN_LITE)
endif()
if (WITH_CN_HEAVY)
add_definitions(/DXMRIG_ALGO_CN_HEAVY)
endif()
if (WITH_CN_PICO)
add_definitions(/DXMRIG_ALGO_CN_PICO)
endif()
if (WITH_CN_FEMTO)
add_definitions(/DXMRIG_ALGO_CN_FEMTO)
endif()
if (WITH_RANDOMX)
add_definitions(/DXMRIG_ALGO_RANDOMX)
endif()
if (WITH_ARGON2)
add_definitions(/DXMRIG_ALGO_ARGON2)
endif()
if (WITH_ASTROBWT)
add_definitions(/DXMRIG_ALGO_ASTROBWT)
endif()
if (WITH_KAWPOW)
if (WITH_DRIVER_API)
add_definitions(/DXMRIG_ALGO_KAWPOW)
else()
set(WITH_KAWPOW OFF)
message(STATUS "CUDA ${CUDA_VERSION}: KawPow disabled, requires
WITH_DRIVER_API=ON for CUDA Driver API and NVRTC")
endif()
endif()
if (WITH_CN_R)
if (WITH_DRIVER_API)
add_definitions(/DXMRIG_ALGO_CN_R)
else()
set(WITH_CN_R OFF)
message(STATUS "CUDA ${CUDA_VERSION}: CryptoNight-R disabled, requires
WITH_DRIVER_API=ON for CUDA Driver API and NVRTC")
endif()
endif()
include_directories(src)
add_definitions(/DCUB_IGNORE_DEPRECATED_CPP_DIALECT)
include(cmake/cpu.cmake)
include(cmake/os.cmake)
include(cmake/flags.cmake)
include(cmake/CUDA.cmake)
set(SOURCES
src/crypto/cn/c_blake256.c
src/crypto/common/Algorithm.cpp
src/crypto/common/Algorithm.h
src/version.h
src/xmrig-cuda.cpp
src/xmrig-cuda.h
)
if (XMRIG_OS_WIN)
list(APPEND SOURCES res/app.rc)
endif()
if (XMRIG_OS_APPLE)
cmake_policy(SET CMP0042 NEW)
endif()