diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 58ca6a9ba9..e75798a549 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -639,6 +639,12 @@ elseif( FLUIDSYNTH_FOUND ) add_definitions( -DHAVE_FLUIDSYNTH ) endif() +option( SEND_ANON_STATS "Enable sending of anonymous hardware statistics" ON ) + +if( NOT SEND_ANON_STATS ) + add_definitions( -DNO_SEND_STATS ) +endif() + # Project files should be aware of the header files. We can GLOB these since # there's generally a new cpp for every header so this file will get changed if( WIN32 ) diff --git a/src/d_stats.cpp b/src/d_stats.cpp index 5886d4cef5..9ea3e80b57 100644 --- a/src/d_stats.cpp +++ b/src/d_stats.cpp @@ -1,3 +1,12 @@ + +#ifdef NO_SEND_STATS + +void D_DoAnonStats() +{ +} + +#else // !NO_SEND_STATS + #if defined(_WIN32) #define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN @@ -276,3 +285,5 @@ void D_DoAnonStats() std::thread t1(D_DoHTTPRequest, requeststring); t1.detach(); } + +#endif // NO_SEND_STATS