Skip to content

Commit

Permalink
Merge pull request #6 from Danixu/feature/logging
Browse files Browse the repository at this point in the history
Feature/logging
  • Loading branch information
Danixu authored Apr 14, 2024
2 parents e86e881 + ff5e359 commit d72b7b3
Show file tree
Hide file tree
Showing 6 changed files with 262 additions and 86 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/compile-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
contents: write

steps:
- uses: actions/checkout@v2
- name: Install Packages
run: sudo apt-get update && sudo apt-get install -y mingw-w64 zip cmake
run: apt-get update && apt-get install -y mingw-w64 zip cmake
- name: Initializing submodules
run: git submodule update --init
- name: Build linux release
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "lib/lz4"]
path = lib/lz4
url = https://github.com/lz4/lz4.git
[submodule "lib/spdlog"]
path = lib/spdlog
url = https://github.com/gabime/spdlog.git
5 changes: 5 additions & 0 deletions include/ziso.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <cmath>
#include <vector>

#include "spdlog/spdlog.h"

// The LZ4_ACCELERATION_MAX is defined in the lz4.c file and is about 65537 (now).
// Testing I have noticed that above 1024 the compression was almost the same, so I'll set the max there.
#define LZ4_MAX_ACCELERATION 1024
Expand Down Expand Up @@ -65,6 +67,9 @@ struct opt
bool lz4hc = false;
bool overwrite = false;
bool hdlFix = false;
std::string logFile = "";
spdlog::level::level_enum logLevel = spdlog::level::err;
bool ignoreHeaderSize = false;
bool keepOutput = false;
} opt_struct;

Expand Down
1 change: 1 addition & 0 deletions lib/spdlog
Submodule spdlog added at a2b426
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
add_executable(ziso ziso.cpp)
#target_compile_features(ziso PRIVATE cxx_std_11)
target_include_directories(ziso PUBLIC ../include/)
target_include_directories(ziso PUBLIC
../include/
../lib/lz4/lib/
../lib/spdlog/include/
)
set_target_properties(ziso PROPERTIES CXX_STANDARD 17)

target_link_libraries(ziso PRIVATE stdc++ -static lz4)
Loading

0 comments on commit d72b7b3

Please sign in to comment.