mirror of
https://github.com/xmrig/xmrig.git
synced 2025-03-23 23:58:53 +00:00
Fixed build without NVML.
This commit is contained in:
parent
16f011a47f
commit
5e444553b1
2 changed files with 10 additions and 8 deletions
|
@ -70,7 +70,7 @@ static const char *kCuda = "cuda";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(XMRIG_FEATURE_NVML)
|
#if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
|
||||||
static const char *kHealthPrintTime = "health-print-time";
|
static const char *kHealthPrintTime = "health-print-time";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ public:
|
||||||
CudaConfig cuda;
|
CudaConfig cuda;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(XMRIG_FEATURE_NVML)
|
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
|
||||||
uint32_t healthPrintTime = 60;
|
uint32_t healthPrintTime = 60;
|
||||||
# endif
|
# endif
|
||||||
};
|
};
|
||||||
|
@ -142,7 +142,7 @@ const xmrig::RxConfig &xmrig::Config::rx() const
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(XMRIG_FEATURE_NVML)
|
#if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
|
||||||
uint32_t xmrig::Config::healthPrintTime() const
|
uint32_t xmrig::Config::healthPrintTime() const
|
||||||
{
|
{
|
||||||
return d_ptr->healthPrintTime;
|
return d_ptr->healthPrintTime;
|
||||||
|
@ -194,7 +194,7 @@ bool xmrig::Config::read(const IJsonReader &reader, const char *fileName)
|
||||||
d_ptr->cuda.read(reader.getValue(kCuda));
|
d_ptr->cuda.read(reader.getValue(kCuda));
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_FEATURE_NVML
|
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
|
||||||
d_ptr->healthPrintTime = reader.getUint(kHealthPrintTime, d_ptr->healthPrintTime);
|
d_ptr->healthPrintTime = reader.getUint(kHealthPrintTime, d_ptr->healthPrintTime);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
||||||
doc.AddMember(StringRef(kLogFile), m_logFile.toJSON(), allocator);
|
doc.AddMember(StringRef(kLogFile), m_logFile.toJSON(), allocator);
|
||||||
doc.AddMember(StringRef(Pools::kPools), m_pools.toJSON(doc), allocator);
|
doc.AddMember(StringRef(Pools::kPools), m_pools.toJSON(doc), allocator);
|
||||||
doc.AddMember(StringRef(kPrintTime), printTime(), allocator);
|
doc.AddMember(StringRef(kPrintTime), printTime(), allocator);
|
||||||
# if defined(XMRIG_FEATURE_NVML)
|
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
|
||||||
doc.AddMember(StringRef(kHealthPrintTime), healthPrintTime(), allocator);
|
doc.AddMember(StringRef(kHealthPrintTime), healthPrintTime(), allocator);
|
||||||
# endif
|
# endif
|
||||||
doc.AddMember(StringRef(Pools::kRetries), m_pools.retries(), allocator);
|
doc.AddMember(StringRef(Pools::kRetries), m_pools.retries(), allocator);
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||||
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
|
||||||
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
|
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -67,8 +67,10 @@ public:
|
||||||
const RxConfig &rx() const;
|
const RxConfig &rx() const;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(XMRIG_FEATURE_NVML)
|
# if defined(XMRIG_FEATURE_NVML) || defined (XMRIG_FEATURE_ADL)
|
||||||
uint32_t healthPrintTime() const;
|
uint32_t healthPrintTime() const;
|
||||||
|
# else
|
||||||
|
uint32_t healthPrintTime() const { return 0; }
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
bool isShouldSave() const;
|
bool isShouldSave() const;
|
||||||
|
|
Loading…
Reference in a new issue