From 5fa7a743f5b418a45a3641cabadf5ffffed39d0b Mon Sep 17 00:00:00 2001 From: XMRig Date: Thu, 14 Nov 2019 15:11:47 +0700 Subject: [PATCH] #1284 Fixed build without RandomX. --- src/backend/cuda/cuda.cmake | 7 +++++-- src/crypto/common/Algorithm.cpp | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backend/cuda/cuda.cmake b/src/backend/cuda/cuda.cmake index 58ba3f5a..8a913aaf 100644 --- a/src/backend/cuda/cuda.cmake +++ b/src/backend/cuda/cuda.cmake @@ -12,7 +12,6 @@ if (WITH_CUDA) src/backend/cuda/interfaces/ICudaRunner.h src/backend/cuda/runners/CudaBaseRunner.h src/backend/cuda/runners/CudaCnRunner.h - src/backend/cuda/runners/CudaRxRunner.h src/backend/cuda/wrappers/CudaDevice.h src/backend/cuda/wrappers/CudaLib.h ) @@ -26,7 +25,6 @@ if (WITH_CUDA) src/backend/cuda/CudaWorker.cpp src/backend/cuda/runners/CudaBaseRunner.cpp src/backend/cuda/runners/CudaCnRunner.cpp - src/backend/cuda/runners/CudaRxRunner.cpp src/backend/cuda/wrappers/CudaDevice.cpp src/backend/cuda/wrappers/CudaLib.cpp ) @@ -44,6 +42,11 @@ if (WITH_CUDA) else() remove_definitions(/DXMRIG_FEATURE_NVML) endif() + + if (WITH_RANDOMX) + list(APPEND HEADERS_BACKEND_CUDA src/backend/cuda/runners/CudaRxRunner.h) + list(APPEND SOURCES_BACKEND_CUDA src/backend/cuda/runners/CudaRxRunner.cpp) + endif() else() remove_definitions(/DXMRIG_FEATURE_CUDA) remove_definitions(/DXMRIG_FEATURE_NVML) diff --git a/src/crypto/common/Algorithm.cpp b/src/crypto/common/Algorithm.cpp index bf04911c..d3c2838a 100644 --- a/src/crypto/common/Algorithm.cpp +++ b/src/crypto/common/Algorithm.cpp @@ -157,7 +157,9 @@ size_t xmrig::Algorithm::l2() const size_t xmrig::Algorithm::l3() const { +# if defined(XMRIG_ALGO_RANDOMX) || defined(XMRIG_ALGO_ARGON2) constexpr size_t oneMiB = 0x100000; +# endif const Family f = family(); assert(f != UNKNOWN);