xmrig/src/base/base.cmake

243 lines
7.3 KiB
CMake
Raw Normal View History

2019-03-15 19:07:26 +00:00
set(HEADERS_BASE
2019-08-12 09:52:16 +00:00
src/base/api/interfaces/IApiListener.h
2020-03-08 18:22:34 +00:00
src/base/crypto/Algorithm.h
src/base/crypto/Coin.h
src/base/crypto/keccak.h
2020-05-24 21:57:41 +00:00
src/base/crypto/sha3.h
2019-03-15 19:07:26 +00:00
src/base/io/Console.h
2020-04-29 07:17:33 +00:00
src/base/io/Env.h
2019-04-13 16:58:58 +00:00
src/base/io/json/Json.h
src/base/io/json/JsonChain.h
2019-04-13 18:10:24 +00:00
src/base/io/json/JsonRequest.h
src/base/io/log/backends/ConsoleLog.h
src/base/io/log/backends/FileLog.h
2020-02-22 23:52:23 +00:00
src/base/io/log/FileLogWriter.h
src/base/io/log/Log.h
2020-05-28 13:32:41 +00:00
src/base/io/log/Tags.h
2020-04-29 07:17:33 +00:00
src/base/io/Signals.h
2019-03-15 19:07:26 +00:00
src/base/io/Watcher.h
2019-04-05 15:14:01 +00:00
src/base/kernel/Base.h
src/base/kernel/config/BaseConfig.h
src/base/kernel/config/BaseTransform.h
2020-06-05 17:24:58 +00:00
src/base/kernel/config/Title.h
2019-03-15 19:07:26 +00:00
src/base/kernel/Entry.h
2019-04-05 15:14:01 +00:00
src/base/kernel/interfaces/IBaseListener.h
2019-04-10 11:29:33 +00:00
src/base/kernel/interfaces/IClient.h
2019-03-15 19:07:26 +00:00
src/base/kernel/interfaces/IClientListener.h
2019-04-05 15:14:01 +00:00
src/base/kernel/interfaces/IConfig.h
2019-03-15 19:07:26 +00:00
src/base/kernel/interfaces/IConfigListener.h
2019-04-05 15:14:01 +00:00
src/base/kernel/interfaces/IConfigTransform.h
2019-03-15 19:07:26 +00:00
src/base/kernel/interfaces/IConsoleListener.h
src/base/kernel/interfaces/IDnsListener.h
src/base/kernel/interfaces/ILineListener.h
src/base/kernel/interfaces/ILogBackend.h
2019-03-15 19:07:26 +00:00
src/base/kernel/interfaces/ISignalListener.h
src/base/kernel/interfaces/IStrategy.h
src/base/kernel/interfaces/IStrategyListener.h
2019-03-17 19:36:17 +00:00
src/base/kernel/interfaces/ITimerListener.h
2019-03-15 19:07:26 +00:00
src/base/kernel/interfaces/IWatcherListener.h
2019-07-13 09:48:14 +00:00
src/base/kernel/Platform.h
2019-03-15 19:07:26 +00:00
src/base/kernel/Process.h
src/base/net/dns/Dns.h
src/base/net/dns/DnsRecord.h
2019-03-28 19:31:56 +00:00
src/base/net/http/Http.h
src/base/net/http/HttpListener.h
2019-04-10 11:29:33 +00:00
src/base/net/stratum/BaseClient.h
2019-03-15 19:07:26 +00:00
src/base/net/stratum/Client.h
src/base/net/stratum/Job.h
2020-01-16 14:48:39 +00:00
src/base/net/stratum/NetworkState.h
2019-03-15 19:07:26 +00:00
src/base/net/stratum/Pool.h
src/base/net/stratum/Pools.h
2020-02-17 19:16:21 +00:00
src/base/net/stratum/ProxyUrl.h
src/base/net/stratum/Socks5.h
2019-03-15 19:07:26 +00:00
src/base/net/stratum/strategies/FailoverStrategy.h
src/base/net/stratum/strategies/SinglePoolStrategy.h
2020-01-16 14:48:39 +00:00
src/base/net/stratum/strategies/StrategyProxy.h
2019-03-15 19:07:26 +00:00
src/base/net/stratum/SubmitResult.h
2019-10-11 02:58:11 +00:00
src/base/net/stratum/Url.h
src/base/net/tools/LineReader.h
src/base/net/tools/MemPool.h
src/base/net/tools/NetBuffer.h
2019-03-15 19:07:26 +00:00
src/base/net/tools/Storage.h
src/base/tools/Arguments.h
src/base/tools/Baton.h
2019-03-15 19:07:26 +00:00
src/base/tools/Buffer.h
src/base/tools/Chrono.h
src/base/tools/Handle.h
src/base/tools/String.h
2019-03-17 19:36:17 +00:00
src/base/tools/Timer.h
2019-03-15 19:07:26 +00:00
)
set(SOURCES_BASE
2020-03-08 18:22:34 +00:00
src/base/crypto/Algorithm.cpp
src/base/crypto/Coin.cpp
src/base/crypto/keccak.cpp
2020-05-24 21:57:41 +00:00
src/base/crypto/sha3.cpp
2019-03-15 19:07:26 +00:00
src/base/io/Console.cpp
2020-04-29 07:17:33 +00:00
src/base/io/Env.cpp
2019-04-13 16:58:58 +00:00
src/base/io/json/Json.cpp
src/base/io/json/JsonChain.cpp
2019-04-13 18:10:24 +00:00
src/base/io/json/JsonRequest.cpp
src/base/io/log/backends/ConsoleLog.cpp
src/base/io/log/backends/FileLog.cpp
2020-02-22 23:52:23 +00:00
src/base/io/log/FileLogWriter.cpp
src/base/io/log/Log.cpp
2020-05-28 13:32:41 +00:00
src/base/io/log/Tags.cpp
2020-04-29 07:17:33 +00:00
src/base/io/Signals.cpp
2019-03-15 19:07:26 +00:00
src/base/io/Watcher.cpp
2019-04-13 18:10:24 +00:00
src/base/kernel/Base.cpp
2019-04-05 15:14:01 +00:00
src/base/kernel/config/BaseConfig.cpp
src/base/kernel/config/BaseTransform.cpp
2020-06-05 17:24:58 +00:00
src/base/kernel/config/Title.cpp
2019-03-15 19:07:26 +00:00
src/base/kernel/Entry.cpp
2019-07-13 09:48:14 +00:00
src/base/kernel/Platform.cpp
2019-03-15 19:07:26 +00:00
src/base/kernel/Process.cpp
src/base/net/dns/Dns.cpp
src/base/net/dns/DnsRecord.cpp
2019-03-28 19:31:56 +00:00
src/base/net/http/Http.cpp
2019-04-10 11:29:33 +00:00
src/base/net/stratum/BaseClient.cpp
2019-03-15 19:07:26 +00:00
src/base/net/stratum/Client.cpp
src/base/net/stratum/Job.cpp
2020-01-16 14:48:39 +00:00
src/base/net/stratum/NetworkState.cpp
2019-03-15 19:07:26 +00:00
src/base/net/stratum/Pool.cpp
src/base/net/stratum/Pools.cpp
2020-02-17 19:16:21 +00:00
src/base/net/stratum/ProxyUrl.cpp
src/base/net/stratum/Socks5.cpp
2019-03-15 19:07:26 +00:00
src/base/net/stratum/strategies/FailoverStrategy.cpp
src/base/net/stratum/strategies/SinglePoolStrategy.cpp
2019-10-11 02:58:11 +00:00
src/base/net/stratum/Url.cpp
src/base/net/tools/LineReader.cpp
src/base/net/tools/NetBuffer.cpp
2019-03-15 19:07:26 +00:00
src/base/tools/Arguments.cpp
src/base/tools/Buffer.cpp
src/base/tools/String.cpp
2019-03-17 19:36:17 +00:00
src/base/tools/Timer.cpp
2019-03-15 19:07:26 +00:00
)
if (WIN32)
2019-07-13 09:48:14 +00:00
set(SOURCES_OS
src/base/io/json/Json_win.cpp
src/base/kernel/Platform_win.cpp
)
elseif (APPLE)
set(SOURCES_OS
src/base/io/json/Json_unix.cpp
src/base/kernel/Platform_mac.cpp
)
2019-03-15 19:07:26 +00:00
else()
2019-07-13 09:48:14 +00:00
set(SOURCES_OS
2020-10-13 16:27:47 +00:00
src/base/io/Async.cpp
2019-07-13 09:48:14 +00:00
src/base/io/json/Json_unix.cpp
2019-10-06 07:40:42 +00:00
src/base/kernel/Platform_unix.cpp
)
endif()
if (WITH_HWLOC)
list(APPEND SOURCES_OS
src/base/kernel/Platform_hwloc.cpp
2019-07-13 09:48:14 +00:00
)
2019-03-15 19:07:26 +00:00
endif()
if (NOT WIN32)
CHECK_INCLUDE_FILE (syslog.h HAVE_SYSLOG_H)
if (HAVE_SYSLOG_H)
add_definitions(/DHAVE_SYSLOG_H)
2019-03-26 15:05:56 +00:00
set(SOURCES_SYSLOG src/base/io/log/backends/SysLog.h src/base/io/log/backends/SysLog.cpp)
endif()
endif()
2019-03-28 19:31:56 +00:00
if (WITH_HTTP)
2019-03-28 19:31:56 +00:00
set(HEADERS_BASE_HTTP
src/3rdparty/http-parser/http_parser.h
2019-08-12 09:52:16 +00:00
src/base/api/Api.h
src/base/api/Httpd.h
src/base/api/interfaces/IApiRequest.h
src/base/api/requests/ApiRequest.h
src/base/api/requests/HttpApiRequest.h
src/base/kernel/interfaces/IHttpListener.h
2019-04-05 15:14:01 +00:00
src/base/kernel/interfaces/IJsonReader.h
src/base/kernel/interfaces/ITcpServerListener.h
src/base/net/http/Fetch.h
2019-03-29 10:14:30 +00:00
src/base/net/http/HttpApiResponse.h
2019-04-08 18:59:22 +00:00
src/base/net/http/HttpClient.h
src/base/net/http/HttpContext.h
2019-04-08 18:59:22 +00:00
src/base/net/http/HttpData.h
src/base/net/http/HttpResponse.h
2019-04-11 20:25:21 +00:00
src/base/net/stratum/DaemonClient.h
2019-10-11 17:24:47 +00:00
src/base/net/stratum/SelfSelectClient.h
src/base/net/tools/TcpServer.h
2019-03-28 19:31:56 +00:00
)
set(SOURCES_BASE_HTTP
src/3rdparty/http-parser/http_parser.c
2019-08-12 09:52:16 +00:00
src/base/api/Api.cpp
src/base/api/Httpd.cpp
src/base/api/requests/ApiRequest.cpp
src/base/api/requests/HttpApiRequest.cpp
src/base/net/http/Fetch.cpp
2019-03-29 10:14:30 +00:00
src/base/net/http/HttpApiResponse.cpp
2019-04-08 18:59:22 +00:00
src/base/net/http/HttpClient.cpp
src/base/net/http/HttpContext.cpp
src/base/net/http/HttpData.cpp
src/base/net/http/HttpListener.cpp
src/base/net/http/HttpResponse.cpp
2019-04-11 20:25:21 +00:00
src/base/net/stratum/DaemonClient.cpp
2019-10-11 17:24:47 +00:00
src/base/net/stratum/SelfSelectClient.cpp
src/base/net/tools/TcpServer.cpp
2019-03-28 19:31:56 +00:00
)
add_definitions(/DXMRIG_FEATURE_HTTP)
add_definitions(/DXMRIG_FEATURE_API)
else()
set(HEADERS_BASE_HTTP "")
set(SOURCES_BASE_HTTP "")
remove_definitions(/DXMRIG_FEATURE_HTTP)
remove_definitions(/DXMRIG_FEATURE_API)
endif()
2019-12-30 09:04:07 +00:00
if (WITH_ENV_VARS AND CMAKE_CXX_COMPILER_ID MATCHES GNU AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
set(WITH_ENV_VARS OFF)
endif()
if (WITH_ENV_VARS)
add_definitions(/DXMRIG_FEATURE_ENV)
else()
remove_definitions(/DXMRIG_FEATURE_ENV)
endif()
2020-05-31 17:56:26 +00:00
if (WITH_KAWPOW)
list(APPEND HEADERS_BASE
src/base/net/stratum/AutoClient.h
src/base/net/stratum/EthStratumClient.h
)
list(APPEND SOURCES_BASE
src/base/net/stratum/AutoClient.cpp
src/base/net/stratum/EthStratumClient.cpp
)
endif()
if (WITH_PROFILING)
add_definitions(/DXMRIG_FEATURE_PROFILING)
2020-10-15 19:18:07 +00:00
list(APPEND HEADERS_BASE src/base/tools/Profiler.h)
list(APPEND SOURCES_BASE src/base/tools/Profiler.cpp)
endif()
2020-10-15 19:18:07 +00:00
if (WITH_RANDOMX AND WITH_BENCHMARK)
add_definitions(/DXMRIG_FEATURE_BENCHMARK)
list(APPEND HEADERS_BASE src/base/net/stratum/NullClient.h)
list(APPEND SOURCES_BASE src/base/net/stratum/NullClient.cpp)
else()
remove_definitions(/DXMRIG_FEATURE_BENCHMARK)
endif()