Added CMake option WITH_BENCHMARK.

This commit is contained in:
XMRig 2020-10-16 02:18:07 +07:00
parent ccebf6bb20
commit a152d6be42
No known key found for this signature in database
GPG key ID: 446A53638BE94409
19 changed files with 245 additions and 121 deletions

View file

@ -6,9 +6,9 @@
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2018 SChernykh <https://github.com/SChernykh>
* Copyright 2019 Howard Chu <https://github.com/hyc>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* 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
@ -154,7 +154,6 @@ void xmrig::Job::copy(const Job &other)
{
m_algorithm = other.m_algorithm;
m_nicehash = other.m_nicehash;
m_bench = other.m_bench;
m_size = other.m_size;
m_clientId = other.m_clientId;
m_id = other.m_id;
@ -175,6 +174,10 @@ void xmrig::Job::copy(const Job &other)
memcpy(m_rawBlob, other.m_rawBlob, sizeof(m_rawBlob));
memcpy(m_rawTarget, other.m_rawTarget, sizeof(m_rawTarget));
# endif
# ifdef XMRIG_FEATURE_BENCHMARK
m_bench = other.m_bench;
# endif
}
@ -182,7 +185,6 @@ void xmrig::Job::move(Job &&other)
{
m_algorithm = other.m_algorithm;
m_nicehash = other.m_nicehash;
m_bench = other.m_bench;
m_size = other.m_size;
m_clientId = std::move(other.m_clientId);
m_id = std::move(other.m_id);
@ -207,4 +209,8 @@ void xmrig::Job::move(Job &&other)
memcpy(m_rawBlob, other.m_rawBlob, sizeof(m_rawBlob));
memcpy(m_rawTarget, other.m_rawTarget, sizeof(m_rawTarget));
# endif
# ifdef XMRIG_FEATURE_BENCHMARK
m_bench = other.m_bench;
# endif
}