mirror of
https://github.com/usatiuk/backup.git
synced 2025-10-27 01:37:49 +01:00
proper cmake
This commit is contained in:
7
src/chunkers/CMakeLists.txt
Normal file
7
src/chunkers/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
add_library(chunkers srcs/Buzhash.cpp srcs/BuzhashChunker.cpp srcs/Chunker.cpp srcs/ChunkerFactory.cpp srcs/ConstChunker.cpp)
|
||||
|
||||
target_include_directories(chunkers PUBLIC includes)
|
||||
|
||||
target_link_libraries(chunkers crypto)
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <memory>
|
||||
#include <streambuf>
|
||||
|
||||
#include "../Config.h"
|
||||
#include "../../utils/includes/Config.h"
|
||||
#include "Chunker.h"
|
||||
|
||||
/// Factory for Chunker%s
|
||||
@@ -2,7 +2,7 @@
|
||||
// Created by Stepan Usatiuk on 26.04.2023.
|
||||
//
|
||||
|
||||
#include "Buzhash.h"
|
||||
#include "../includes/Buzhash.h"
|
||||
|
||||
Buzhash::Buzhash(uint32_t blockSize) : blockSize(blockSize), history() {}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// Created by Stepan Usatiuk on 26.04.2023.
|
||||
//
|
||||
|
||||
#include "BuzhashChunker.h"
|
||||
#include "../includes/BuzhashChunker.h"
|
||||
|
||||
#include "../Exception.h"
|
||||
#include "../crypto/MD5.h"
|
||||
#include "../../crypto/includes/MD5.h"
|
||||
#include "../../utils/includes/Exception.h"
|
||||
|
||||
BuzhashChunker::BuzhashChunker(std::streambuf *buf, unsigned long long minBytes, unsigned long long maxBytes, unsigned long long mask, uint32_t window) : Chunker(buf, maxBytes), window(window), minBytes(minBytes), mask(mask), buzhash(window) {}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// Created by Stepan Usatiuk on 15.04.2023.
|
||||
//
|
||||
|
||||
#include "Chunker.h"
|
||||
#include "../includes/Chunker.h"
|
||||
|
||||
#include "../Exception.h"
|
||||
#include "../../utils/includes/Exception.h"
|
||||
|
||||
Chunker::Chunker(std::streambuf *buf, unsigned long long maxBytes) : buf(buf), maxBytes(maxBytes) {}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
// Created by Stepan Usatiuk on 30.04.2023.
|
||||
//
|
||||
|
||||
#include "ChunkerFactory.h"
|
||||
#include "../includes/ChunkerFactory.h"
|
||||
|
||||
#include "../Exception.h"
|
||||
#include "BuzhashChunker.h"
|
||||
#include "ConstChunker.h"
|
||||
#include "../../utils/includes/Exception.h"
|
||||
#include "../includes/BuzhashChunker.h"
|
||||
#include "../includes/ConstChunker.h"
|
||||
|
||||
std::unique_ptr<Chunker> ChunkerFactory::getChunker(const Config &config, std::streambuf *buf) {
|
||||
if (config.getStr("chunker") == "const") {
|
||||
@@ -2,10 +2,10 @@
|
||||
// Created by Stepan Usatiuk on 15.04.2023.
|
||||
//
|
||||
|
||||
#include "ConstChunker.h"
|
||||
#include "../includes/ConstChunker.h"
|
||||
|
||||
#include "../Exception.h"
|
||||
#include "../crypto/MD5.h"
|
||||
#include "../../crypto/includes/MD5.h"
|
||||
#include "../../utils/includes/Exception.h"
|
||||
|
||||
ConstChunker::ConstChunker(std::streambuf *buf, unsigned long long maxBytes) : Chunker(buf, maxBytes) {}
|
||||
|
||||
Reference in New Issue
Block a user