Skip to content

Commit bc3fea5

Browse files
committed
fix: include
Signed-off-by: HominSu <[email protected]>
1 parent 75352b2 commit bc3fea5

File tree

8 files changed

+15
-4
lines changed

8 files changed

+15
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ if (NOT CMAKE_BUILD_TYPE)
2828
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
2929
endif ()
3030

31-
option(BENCODE_BUILD_EXAMPLES "Build bencode examples." ON)
32-
option(BENCODE_BUILD_TESTS "Build bencode unittests." ON)
31+
option(BENCODE_BUILD_EXAMPLES "Build bencode examples." OFF)
32+
option(BENCODE_BUILD_TESTS "Build bencode unittests." OFF)
3333

3434
option(BENCODE_ENABLE_INSTRUMENTATION_OPT "Build bencode with -march or -mcpu options" ON)
3535
option(BENCODE_BUILD_ASAN "Build bencode with address sanitizer (gcc/clang)" OFF)

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ RUN apk add --no-cache git build-base cmake
77
COPY . /src
88
WORKDIR /src
99
RUN cmake -H. -Bbuild \
10-
-DCMAKE_BUILD_TYPE=Releasec \
10+
-DCMAKE_BUILD_TYPE=Release \
1111
-DBENCODE_BUILD_EXAMPLES=ON \
1212
-DBENCODE_BUILD_TESTS=ON \
1313
-DBENCODE_ENABLE_INSTRUMENTATION_OPT=OFF \
1414
-DBENCODE_BUILD_ASAN=OFF \
1515
-DBENCODE_BUILD_UBSAN=OFF && \
1616
cmake --build ./build --parallel $(nproc) && \
17-
GTEST_COLOR=TRUE ctest --test-dir ./build/test --output-on-failure && \
17+
GTEST_COLOR=TRUE ctest --test-dir ./build/ --output-on-failure && \
1818
cmake --install ./build
1919

2020
# final stage

include/bencode/document.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#ifndef BENCODE_INCLUDE_BENCODE_DOCUMENT_H_
2828
#define BENCODE_INCLUDE_BENCODE_DOCUMENT_H_
2929

30+
#include <cstdint>
31+
3032
#include <string_view>
3133
#include <variant>
3234
#include <vector>

include/bencode/reader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#ifndef BENCODE_INCLUDE_BENCODE_READER_H_
2828
#define BENCODE_INCLUDE_BENCODE_READER_H_
2929

30+
#include <cstdint>
31+
3032
#include <string>
3133

3234
#include "exception.h"

include/bencode/value.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#ifndef BENCODE_INCLUDE_BENCODE_VALUE_H_
2828
#define BENCODE_INCLUDE_BENCODE_VALUE_H_
2929

30+
#include <cstdint>
3031
#include <cstring>
3132

3233
#include <algorithm>

include/bencode/writer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#ifndef BENCODE_INCLUDE_BENCODE_WRITER_H_
2828
#define BENCODE_INCLUDE_BENCODE_WRITER_H_
2929

30+
#include <cstdint>
31+
3032
#include <string_view>
3133
#include <vector>
3234

test/itoa_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
// Created by Homin Su on 2023/3/10.
2525
//
2626

27+
#include <cstdint>
28+
2729
#include <limits>
2830

2931
#include "bencode/internal/itoa.h"

test/parse_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
// Created by Homin Su on 2023/3/10.
2525
//
2626

27+
#include <cstdint>
28+
2729
#include "bencode/bencode.h"
2830
#include "bencode/document.h"
2931
#include "bencode/exception.h"

0 commit comments

Comments
 (0)