Skip to content

Commit

Permalink
option to not download boost
Browse files Browse the repository at this point in the history
  • Loading branch information
kelbon committed Jan 14, 2025
1 parent e02e46f commit 3aa1582
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ project(HPACK LANGUAGES CXX)
### options ###

option(HPACK_ENABLE_TESTING "enables testing" OFF)
option(HPACK_USE_CPM "turn off to not download boost" ON)

### dependecies ###

if(HPACK_USE_CPM)

include(cmake/get_cpm.cmake)

set(BOOST_INCLUDE_LIBRARIES intrusive)
Expand All @@ -19,6 +22,8 @@ CPMAddPackage(
unset(BOOST_INCLUDE_LIBRARIES)
find_package(Boost 1.84 COMPONENTS intrusive REQUIRED)

endif()

### hpacklib ###

add_library(hpacklib STATIC
Expand Down
6 changes: 4 additions & 2 deletions tests/test_hpack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,10 @@ TEST(huffman_rand) {
}

TEST(huffman_table_itself) {
#define HUFFMAN_TABLE(index, bits, bitcount) \
{ error_if(hpack::huffman_decode_table_find(hpack::sym_info_t{0b##bits, bitcount}) != uint16_t(index)); }
#define HUFFMAN_TABLE(index, bits, bitcount) \
{ \
error_if(hpack::huffman_decode_table_find(hpack::sym_info_t{0b##bits, bitcount}) != uint16_t(index)); \
}
#include "hpack/huffman_table.def"
}

Expand Down

0 comments on commit 3aa1582

Please sign in to comment.