XMRigCC 2.1.0 (#270)
* New XMRigCCServer without dependencies and now with full TLS support on Windows * Dashboard * Added all columns to the dashboard * Dynamic table view (column visibility) * Grouping by Algo * GZIP compression for the whole traffic * Full Rebase on XMRig 3.2.0 * Final randomX/0 (XMR) * Coin config * Bugfixes
This commit is contained in:
parent
b395fe94f6
commit
f7c3dd88ee
90 changed files with 9477 additions and 7371 deletions
35
src/3rdparty/argon2/CMakeLists.txt
vendored
35
src/3rdparty/argon2/CMakeLists.txt
vendored
|
@ -1,23 +1,23 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(Argon2 C)
|
||||
set(ARGON2_VERSION 1.0)
|
||||
project(argon2 C)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
add_library(argon2 STATIC
|
||||
set(ARGON2_SOURCES
|
||||
lib/argon2.c
|
||||
lib/core.c
|
||||
lib/encoding.c
|
||||
lib/genkat.c
|
||||
lib/impl-select.c
|
||||
lib/blake2/blake2.c
|
||||
)
|
||||
)
|
||||
|
||||
target_include_directories(argon2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_include_directories(argon2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
set(ARGON2_X86_64_ENABLED ON)
|
||||
set(ARGON2_X86_64_LIBS argon2-sse2 argon2-ssse3 argon2-xop argon2-avx2 argon2-avx512f)
|
||||
set(ARGON2_X86_64_SOURCES arch/x86_64/lib/argon2-arch.c arch/x86_64/lib/cpu-flags.c)
|
||||
|
||||
if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
||||
function(add_feature_impl FEATURE MSVC_FLAG DEF)
|
||||
|
@ -28,7 +28,6 @@ if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
|||
|
||||
target_compile_options(argon2-${FEATURE} PRIVATE ${MSVC_FLAG})
|
||||
target_compile_definitions(argon2-${FEATURE} PRIVATE ${DEF})
|
||||
target_link_libraries(argon2 PUBLIC argon2-${FEATURE})
|
||||
endfunction()
|
||||
|
||||
add_feature_impl(sse2 "" HAVE_SSE2)
|
||||
|
@ -36,8 +35,6 @@ if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
|||
add_feature_impl(xop "" HAVE_XOP)
|
||||
add_feature_impl(avx2 "/arch:AVX2" HAVE_AVX2)
|
||||
add_feature_impl(avx512f "/arch:AVX512F" HAVE_AVX512F)
|
||||
|
||||
target_sources(argon2 PRIVATE arch/x86_64/lib/argon2-arch.c arch/x86_64/lib/cpu-flags.c)
|
||||
elseif (NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
function(add_feature_impl FEATURE GCC_FLAG DEF)
|
||||
add_library(argon2-${FEATURE} STATIC arch/x86_64/lib/argon2-${FEATURE}.c)
|
||||
|
@ -67,8 +64,6 @@ elseif (NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|||
message("-- argon2: feature '${FEATURE}' detected!")
|
||||
target_compile_definitions(argon2-${FEATURE} PRIVATE ${DEF})
|
||||
endif()
|
||||
|
||||
target_link_libraries(argon2 PUBLIC argon2-${FEATURE})
|
||||
endfunction()
|
||||
|
||||
add_feature_impl(sse2 -msse2 HAVE_SSE2)
|
||||
|
@ -76,8 +71,18 @@ elseif (NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|||
add_feature_impl(xop -mxop HAVE_XOP)
|
||||
add_feature_impl(avx2 -mavx2 HAVE_AVX2)
|
||||
add_feature_impl(avx512f -mavx512f HAVE_AVX512F)
|
||||
|
||||
target_sources(argon2 PRIVATE arch/x86_64/lib/argon2-arch.c arch/x86_64/lib/cpu-flags.c)
|
||||
else()
|
||||
target_sources(argon2 PRIVATE arch/generic/lib/argon2-arch.c)
|
||||
set(ARGON2_X86_64_ENABLED OFF)
|
||||
list(APPEND ARGON2_SOURCES arch/generic/lib/argon2-arch.c)
|
||||
endif()
|
||||
|
||||
if (ARGON2_X86_64_ENABLED)
|
||||
set(ARGON2_LIBS ${ARGON2_X86_64_LIBS})
|
||||
list(APPEND ARGON2_SOURCES ${ARGON2_X86_64_SOURCES})
|
||||
endif()
|
||||
|
||||
add_library(argon2 STATIC ${ARGON2_SOURCES})
|
||||
target_link_libraries(argon2 ${ARGON2_LIBS})
|
||||
|
||||
target_include_directories(argon2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_include_directories(argon2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib)
|
||||
|
|
132
src/3rdparty/base64/base64.h
vendored
Normal file
132
src/3rdparty/base64/base64.h
vendored
Normal file
|
@ -0,0 +1,132 @@
|
|||
#ifndef _BASE64_H_
|
||||
#define _BASE64_H_
|
||||
|
||||
/**
|
||||
* The MIT License (MIT)
|
||||
* Copyright (c) 2016 tomykaira
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
class Base64
|
||||
{
|
||||
public:
|
||||
|
||||
static std::string Encode(const std::string data)
|
||||
{
|
||||
static constexpr char sEncodingTable[] = {
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
|
||||
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
|
||||
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
|
||||
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
|
||||
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
|
||||
'w', 'x', 'y', 'z', '0', '1', '2', '3',
|
||||
'4', '5', '6', '7', '8', '9', '+', '/'
|
||||
};
|
||||
|
||||
size_t in_len = data.size();
|
||||
size_t out_len = 4 * ((in_len + 2) / 3);
|
||||
std::string ret(out_len, '\0');
|
||||
size_t i;
|
||||
char* p = const_cast<char*>(ret.c_str());
|
||||
|
||||
for (i = 0; i < in_len - 2; i += 3)
|
||||
{
|
||||
*p++ = sEncodingTable[(data[i] >> 2) & 0x3F];
|
||||
*p++ = sEncodingTable[((data[i] & 0x3) << 4) | ((int) (data[i + 1] & 0xF0) >> 4)];
|
||||
*p++ = sEncodingTable[((data[i + 1] & 0xF) << 2) | ((int) (data[i + 2] & 0xC0) >> 6)];
|
||||
*p++ = sEncodingTable[data[i + 2] & 0x3F];
|
||||
}
|
||||
if (i < in_len)
|
||||
{
|
||||
*p++ = sEncodingTable[(data[i] >> 2) & 0x3F];
|
||||
if (i == (in_len - 1))
|
||||
{
|
||||
*p++ = sEncodingTable[((data[i] & 0x3) << 4)];
|
||||
*p++ = '=';
|
||||
}
|
||||
else
|
||||
{
|
||||
*p++ = sEncodingTable[((data[i] & 0x3) << 4) | ((int) (data[i + 1] & 0xF0) >> 4)];
|
||||
*p++ = sEncodingTable[((data[i + 1] & 0xF) << 2)];
|
||||
}
|
||||
*p++ = '=';
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static std::string Decode(const std::string& input, std::string& out)
|
||||
{
|
||||
static constexpr unsigned char kDecodingTable[] = {
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63,
|
||||
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64,
|
||||
64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64,
|
||||
64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
|
||||
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
|
||||
};
|
||||
|
||||
size_t in_len = input.size();
|
||||
if (in_len % 4 != 0)
|
||||
{ return "Input data size is not a multiple of 4"; }
|
||||
|
||||
size_t out_len = in_len / 4 * 3;
|
||||
if (input[in_len - 1] == '=')
|
||||
{ out_len--; }
|
||||
if (input[in_len - 2] == '=')
|
||||
{ out_len--; }
|
||||
|
||||
out.resize(out_len);
|
||||
|
||||
for (size_t i = 0, j = 0; i < in_len;)
|
||||
{
|
||||
uint32_t a = input[i] == '=' ? 0 & i++ : kDecodingTable[static_cast<int>(input[i++])];
|
||||
uint32_t b = input[i] == '=' ? 0 & i++ : kDecodingTable[static_cast<int>(input[i++])];
|
||||
uint32_t c = input[i] == '=' ? 0 & i++ : kDecodingTable[static_cast<int>(input[i++])];
|
||||
uint32_t d = input[i] == '=' ? 0 & i++ : kDecodingTable[static_cast<int>(input[i++])];
|
||||
|
||||
uint32_t triple = (a << 3 * 6) + (b << 2 * 6) + (c << 1 * 6) + (d << 0 * 6);
|
||||
|
||||
if (j < out_len)
|
||||
{ out[j++] = (triple >> 2 * 8) & 0xFF; }
|
||||
if (j < out_len)
|
||||
{ out[j++] = (triple >> 1 * 8) & 0xFF; }
|
||||
if (j < out_len)
|
||||
{ out[j++] = (triple >> 0 * 8) & 0xFF; }
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _BASE64_H_ */
|
5474
src/3rdparty/cpp-httplib/httplib.h
vendored
5474
src/3rdparty/cpp-httplib/httplib.h
vendored
File diff suppressed because it is too large
Load diff
97
src/3rdparty/cxxopts/CHANGELOG.md
vendored
Normal file
97
src/3rdparty/cxxopts/CHANGELOG.md
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
# Changelog
|
||||
|
||||
This is the changelog for `cxxopts`, a C++11 library for parsing command line
|
||||
options. The project adheres to semantic versioning.
|
||||
|
||||
## Next version
|
||||
|
||||
### Changed
|
||||
|
||||
* Only search for a C++ compiler in CMakeLists.txt.
|
||||
* Allow for exceptions to be disabled.
|
||||
* Fix duplicate default options when there is a short and long option.
|
||||
* Add `CXXOPTS_NO_EXCEPTIONS` to disable exceptions.
|
||||
* Fix char parsing for space and check for length.
|
||||
|
||||
## 2.2
|
||||
|
||||
### Changed
|
||||
|
||||
* Allow integers to have leading zeroes.
|
||||
* Build the tests by default.
|
||||
* Don't check for container when showing positional help.
|
||||
|
||||
### Added
|
||||
|
||||
* Iterator inputs to `parse_positional`.
|
||||
* Throw an exception if the option in `parse_positional` doesn't exist.
|
||||
* Parse a delimited list in a single argument for vector options.
|
||||
* Add an option to disable implicit value on booleans.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix a warning about possible loss of data.
|
||||
* Fix version numbering in CMakeLists.txt
|
||||
* Remove unused declaration of the undefined `ParseResult::get_option`.
|
||||
* Throw on invalid option syntax when beginning with a `-`.
|
||||
* Throw in `as` when option wasn't present.
|
||||
* Fix catching exceptions by reference.
|
||||
* Fix out of bounds errors parsing integers.
|
||||
|
||||
## 2.1.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Revert the change adding `const` type for `argv`, because most users expect
|
||||
to pass a non-const `argv` from `main`.
|
||||
|
||||
## 2.1
|
||||
|
||||
### Changed
|
||||
|
||||
* Options with implicit arguments now require the `--option=value` form if
|
||||
they are to be specified with an option. This is to remove the ambiguity
|
||||
when a positional argument could follow an option with an implicit value.
|
||||
For example, `--foo value`, where `foo` has an implicit value, will be
|
||||
parsed as `--foo=implicit` and a positional argument `value`.
|
||||
* Boolean values are no longer special, but are just an option with a default
|
||||
and implicit value.
|
||||
|
||||
### Added
|
||||
|
||||
* Added support for `std::optional` as a storage type.
|
||||
* Allow the help string to be customised.
|
||||
* Use `const` for the type in the `argv` parameter, since the contents of the
|
||||
arguments is never modified.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Building against GCC 4.9 was broken due to overly strict shadow warnings.
|
||||
* Fixed an ambiguous overload in the `parse_positional` function when an
|
||||
`initializer_list` was directly passed.
|
||||
* Fixed precedence in the Boolean value regex.
|
||||
|
||||
## 2.0
|
||||
|
||||
### Changed
|
||||
|
||||
* `Options::parse` returns a ParseResult rather than storing the parse
|
||||
result internally.
|
||||
* Options with default values now get counted as appearing once if they
|
||||
were not specified by the user.
|
||||
|
||||
### Added
|
||||
|
||||
* A new `ParseResult` object that is the immutable result of parsing. It
|
||||
responds to the same `count` and `operator[]` as `Options` of 1.x did.
|
||||
* The function `ParseResult::arguments` returns a vector of the parsed
|
||||
arguments to iterate through in the order they were provided.
|
||||
* The symbol `cxxopts::version` for the version of the library.
|
||||
* Booleans can be specified with various strings and explicitly set false.
|
||||
|
||||
## 1.x
|
||||
|
||||
The 1.x series was the first major version of the library, with release numbers
|
||||
starting to follow semantic versioning, after 0.x being unstable. It never had
|
||||
a changelog maintained for it. Releases mostly contained bug fixes, with the
|
||||
occasional feature added.
|
19
src/3rdparty/cxxopts/LICENSE
vendored
Normal file
19
src/3rdparty/cxxopts/LICENSE
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) 2014 Jarryd Beck
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
157
src/3rdparty/cxxopts/README.md
vendored
Normal file
157
src/3rdparty/cxxopts/README.md
vendored
Normal file
|
@ -0,0 +1,157 @@
|
|||
[](https://travis-ci.org/jarro2783/cxxopts)
|
||||
|
||||
# Release versions
|
||||
|
||||
Note that `master` is generally a work in progress, and you probably want to use a
|
||||
tagged release version.
|
||||
|
||||
# Quick start
|
||||
|
||||
This is a lightweight C++ option parser library, supporting the standard GNU
|
||||
style syntax for options.
|
||||
|
||||
Options can be given as:
|
||||
|
||||
--long
|
||||
--long=argument
|
||||
--long argument
|
||||
-a
|
||||
-ab
|
||||
-abc argument
|
||||
|
||||
where c takes an argument, but a and b do not.
|
||||
|
||||
Additionally, anything after `--` will be parsed as a positional argument.
|
||||
|
||||
## Basics
|
||||
|
||||
#include <cxxopts.hpp>
|
||||
|
||||
Create a cxxopts::Options instance.
|
||||
|
||||
cxxopts::Options options("MyProgram", "One line description of MyProgram");
|
||||
|
||||
Then use `add_options`.
|
||||
|
||||
options.add_options()
|
||||
("d,debug", "Enable debugging")
|
||||
("f,file", "File name", cxxopts::value<std::string>())
|
||||
;
|
||||
|
||||
Options are declared with a long and an optional short option. A description
|
||||
must be provided. The third argument is the value, if omitted it is boolean.
|
||||
Any type can be given as long as it can be parsed, with operator>>.
|
||||
|
||||
To parse the command line do:
|
||||
|
||||
auto result = options.parse(argc, argv);
|
||||
|
||||
To retrieve an option use `result.count("option")` to get the number of times
|
||||
it appeared, and
|
||||
|
||||
result["opt"].as<type>()
|
||||
|
||||
to get its value. If "opt" doesn't exist, or isn't of the right type, then an
|
||||
exception will be thrown.
|
||||
|
||||
Note that the result of `options.parse` should only be used as long as the
|
||||
`options` object that created it is in scope.
|
||||
|
||||
## Exceptions
|
||||
|
||||
Exceptional situations throw C++ exceptions. There are two types of
|
||||
exceptions: errors defining the options, and errors when parsing a list of
|
||||
arguments. All exceptions derive from `cxxopts::OptionException`. Errors
|
||||
defining options derive from `cxxopts::OptionSpecException` and errors
|
||||
parsing arguments derive from `cxxopts::OptionParseException`.
|
||||
|
||||
All exceptions define a `what()` function to get a printable string
|
||||
explaining the error.
|
||||
|
||||
## Help groups
|
||||
|
||||
Options can be placed into groups for the purposes of displaying help messages.
|
||||
To place options in a group, pass the group as a string to `add_options`. Then,
|
||||
when displaying the help, pass the groups that you would like displayed as a
|
||||
vector to the `help` function.
|
||||
|
||||
## Positional Arguments
|
||||
|
||||
Positional arguments can be optionally parsed into one or more options.
|
||||
To set up positional arguments, call
|
||||
|
||||
options.parse_positional({"first", "second", "last"})
|
||||
|
||||
where "last" should be the name of an option with a container type, and the
|
||||
others should have a single value.
|
||||
|
||||
## Default and implicit values
|
||||
|
||||
An option can be declared with a default or an implicit value, or both.
|
||||
|
||||
A default value is the value that an option takes when it is not specified
|
||||
on the command line. The following specifies a default value for an option:
|
||||
|
||||
cxxopts::value<std::string>()->default_value("value")
|
||||
|
||||
An implicit value is the value that an option takes when it is given on the
|
||||
command line without an argument. The following specifies an implicit value:
|
||||
|
||||
cxxopts::value<std::string>()->implicit_value("implicit")
|
||||
|
||||
If an option had both, then not specifying it would give the value `"value"`,
|
||||
writing it on the command line as `--option` would give the value `"implicit"`,
|
||||
and writing `--option=another` would give it the value `"another"`.
|
||||
|
||||
Note that the default and implicit value is always stored as a string,
|
||||
regardless of the type that you want to store it in. It will be parsed as
|
||||
though it was given on the command line.
|
||||
|
||||
## Boolean values
|
||||
|
||||
Boolean options have a default implicit value of `"true"`, which can be
|
||||
overridden. The effect is that writing `-o` by itself will set option `o` to
|
||||
`true`. However, they can also be written with various strings using `=value`.
|
||||
There is no way to disambiguate positional arguments from the value following
|
||||
a boolean, so we have chosen that they will be positional arguments, and
|
||||
therefore, `-o false` does not work.
|
||||
|
||||
## `std::vector<T>` values
|
||||
|
||||
Parsing of list of values in form of an `std::vector<T>` is also supported, as long as `T`
|
||||
can be parsed. To separate single values in a list the definition `CXXOPTS_VECTOR_DELIMITER`
|
||||
is used, which is ',' by default. Ensure that you use no whitespaces between values because
|
||||
those would be interpreted as the next command line option. Example for a command line option
|
||||
that can be parsed as a `std::vector<double>`:
|
||||
|
||||
~~~
|
||||
--my_list=1,-2.1,3,4.5
|
||||
~~~
|
||||
|
||||
## Custom help
|
||||
|
||||
The string after the program name on the first line of the help can be
|
||||
completely replaced by calling `options.custom_help`. Note that you might
|
||||
also want to override the positional help by calling `options.positional_help`.
|
||||
|
||||
# Linking
|
||||
|
||||
This is a header only library.
|
||||
|
||||
# Requirements
|
||||
|
||||
The only build requirement is a C++ compiler that supports C++11 features such as:
|
||||
|
||||
* regex
|
||||
* constexpr
|
||||
* default constructors
|
||||
|
||||
GCC >= 4.9 or clang >= 3.1 with libc++ are known to work.
|
||||
|
||||
The following compilers are known not to work:
|
||||
|
||||
* MSVC 2013
|
||||
|
||||
# TODO list
|
||||
|
||||
* Allow unrecognised options.
|
2214
src/3rdparty/cxxopts/cxxopts.hpp
vendored
Normal file
2214
src/3rdparty/cxxopts/cxxopts.hpp
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue