mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 11:59:48 -04:00
feat: list boost dependency
This commit is contained in:
parent
e2378eb123
commit
f2afdfb4df
@ -28,6 +28,7 @@ namespace dwarfs {
|
||||
|
||||
enum class version_format {
|
||||
maj_min_patch_dec_100, // 1.2.3 <-> 10203
|
||||
boost, // 1.2.3 <-> 100203
|
||||
};
|
||||
|
||||
class library_dependencies {
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <openssl/crypto.h>
|
||||
#include <xxhash.h>
|
||||
|
||||
@ -38,6 +39,9 @@ std::string version_to_string(uint64_t version, version_format fmt) {
|
||||
case version_format::maj_min_patch_dec_100:
|
||||
return fmt::format("{}.{}.{}", version / 10000, (version / 100) % 100,
|
||||
version % 100);
|
||||
case version_format::boost:
|
||||
return fmt::format("{}.{}.{}", version / 100000, (version / 100) % 1000,
|
||||
version % 100);
|
||||
}
|
||||
|
||||
throw std::invalid_argument("unsupported version format");
|
||||
@ -82,6 +86,7 @@ void library_dependencies::add_common_libraries() {
|
||||
add_library("libfmt", FMT_VERSION, version_format::maj_min_patch_dec_100);
|
||||
add_library("libcrypto", OPENSSL_version_major(), OPENSSL_version_minor(),
|
||||
OPENSSL_version_patch());
|
||||
add_library("libboost", BOOST_VERSION, version_format::boost);
|
||||
|
||||
compression_registry::instance().for_each_algorithm(
|
||||
[this](compression_type, compression_info const& info) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user