From 05f8b796d1c7ca9d87cbdf695d479e9610eeb01a Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 5 May 2024 17:53:09 +0800 Subject: [PATCH] Update donation flags --- .gitignore | 3 ++- CMakeLists.txt | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 178251c45..ade564274 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ scripts/deps /CMakeLists.txt.user /.idea /src/backend/opencl/cl/cn/cryptonight_gen.cl -/.vscode \ No newline at end of file +/.vscode +/..bfg-report \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 70d57d107..ad45d6fe1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.5) project(xmrig) +option(WITH_DONATION "Enable donation" ON) option(WITH_HWLOC "Enable hwloc support" ON) option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON) option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON) @@ -135,6 +136,13 @@ if (CMAKE_C_COMPILER_ID MATCHES GNU) set_source_files_properties(src/crypto/cn/CnHash.cpp PROPERTIES COMPILE_FLAGS "-Ofast -fno-tree-vectorize") endif() +if(WITH_DONATION) + message("-- Donation state: enabled") +else() + message("-- Donation state: disabled") + add_definitions(-DXMRIG_NO_DONATE) +endif() + if (WITH_VAES) add_definitions(-DXMRIG_VAES) set(HEADERS_CRYPTO "${HEADERS_CRYPTO}" src/crypto/cn/CryptoNight_x86_vaes.h)