Add pause-on-process feature

This commit is contained in:
Tony Butler 2021-10-08 21:00:51 -06:00
parent 7627b23212
commit 9385e21b97
10 changed files with 252 additions and 1 deletions

View file

@ -30,6 +30,7 @@ option(WITH_SSE4_1 "Enable SSE 4.1 for Blake2" ON)
option(WITH_BENCHMARK "Enable builtin RandomX benchmark and stress test" ON)
option(WITH_SECURE_JIT "Enable secure access to JIT memory" OFF)
option(WITH_DMI "Enable DMI/SMBIOS reader" ON)
option(WITH_PAUSE_PROCESS "Enable Pause-on-Process feature" ON)
option(BUILD_STATIC "Build static binary" OFF)
option(ARM_TARGET "Force use specific ARM target 8 or 7" 0)
@ -147,6 +148,9 @@ if (XMRIG_OS_WIN)
)
set(EXTRA_LIBS ws2_32 psapi iphlpapi userenv)
if (WITH_PAUSE_PROCESS)
list(APPEND EXTRA_LIBS shlwapi)
endif()
elseif (XMRIG_OS_APPLE)
list(APPEND SOURCES_OS
src/App_unix.cpp
@ -171,6 +175,14 @@ else()
)
set(EXTRA_LIBS pthread rt dl)
if ((WITH_PAUSE_PROCESS) AND
((CMAKE_CXX_COMPILER_ID MATCHES Clang) OR
((CMAKE_CXX_COMPILER_ID MATCHES GNU) AND
(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "9.0.0"))
)
)
list(APPEND EXTRA_LIBS stdc++fs)
endif()
elseif (XMRIG_OS_FREEBSD)
set(EXTRA_LIBS kvm pthread)
endif()