Skip to content

Commit 658312c

Browse files
xDimonYura Zarudniy
andauthored
Change cmake-files for using internal fork of Hunter package manager (#68)
Change cmake-files for using internal fork of Hunter package manager Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]> Co-authored-by: Yura Zarudniy <[email protected]>
1 parent d65b003 commit 658312c

File tree

4 files changed

+15
-48
lines changed

4 files changed

+15
-48
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ set(CMAKE_TOOLCHAIN_FILE
1414
)
1515

1616
include("cmake/Hunter/init.cmake")
17-
project(libp2p C CXX)
17+
cmake_policy(SET CMP0048 NEW)
18+
project(libp2p VERSION 0.0.1 LANGUAGES C CXX)
1819

1920
include(cmake/print.cmake)
2021
print("C flags: ${CMAKE_C_FLAGS}")

cmake/Hunter/config.cmake

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,6 @@
1-
hunter_config(
2-
Boost
3-
VERSION 1.70.0-p0
4-
)
5-
6-
hunter_config(GSL
7-
URL https://github.com/microsoft/GSL/archive/v2.0.0.tar.gz
8-
SHA1 9bbdea551b38d7d09ab7aa2e89b91a66dd032b4a
9-
CMAKE_ARGS GSL_TEST=OFF
10-
)
11-
12-
hunter_config(
13-
GTest
14-
VERSION 1.8.0-hunter-p11
15-
CMAKE_ARGS "CMAKE_CXX_FLAGS=-Wno-deprecated-copy"
16-
)
17-
18-
hunter_config(
19-
spdlog
20-
URL https://github.com/gabime/spdlog/archive/v1.4.2.zip
21-
SHA1 4b10e9aa17f7d568e24f464b48358ab46cb6f39c
22-
)
23-
24-
hunter_config(
25-
tsl_hat_trie
26-
URL https://github.com/masterjedy/hat-trie/archive/343e0dac54fc8491065e8a059a02db9a2b1248ab.zip
27-
SHA1 7b0051e9388d629f382752dd6a12aa8918cdc022
28-
)
29-
30-
hunter_config(
31-
Boost.DI
32-
URL https://github.com/masterjedy/di/archive/c5287ee710ad90f5286d0cc2b9e49b72d89267a6.zip
33-
SHA1 802b64a6242be45771f3d4c86257eac0a3c7b289
34-
# disable building examples and tests, disable testing
35-
CMAKE_ARGS BOOST_DI_OPT_BUILD_TESTS=OFF BOOST_DI_OPT_BUILD_EXAMPLES=OFF
36-
)
37-
38-
hunter_config(
39-
SQLiteModernCpp
40-
URL https://github.com/soramitsu/libp2p-sqlite-modern-cpp/archive/fc3b700064cb57ab6b598c9bc7a12b2842f78da2.zip
41-
SHA1 d913f2a0360892a30bc7cd8820a0475800b47d76
42-
)
1+
## Template for add custom hunter config
2+
#hunter_config(
3+
# package-name
4+
# VERSION 0.0.0-package-version
5+
# CMAKE_ARGS "CMAKE_VARIABLE=value"
6+
#)

cmake/Hunter/init.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ string(COMPARE EQUAL "$ENV{GITHUB_HUNTER_USERNAME}" "" username_is_empty)
77
if (NOT password_is_empty AND NOT username_is_empty)
88
option(HUNTER_RUN_UPLOAD "Upload cache binaries" YES)
99
message("Binary cache uploading is ENABLED.")
10+
else()
11+
option(HUNTER_RUN_UPLOAD "Upload cache binaries" NO)
12+
message("Binary cache uploading is DISABLED.")
1013
endif ()
1114

1215
set(
@@ -25,11 +28,10 @@ set(
2528
"Binary cache server"
2629
)
2730

28-
2931
include(${CMAKE_CURRENT_LIST_DIR}/HunterGate.cmake)
3032

3133
HunterGate(
32-
URL "https://github.com/cpp-pm/hunter/archive/v0.23.216.tar.gz"
33-
SHA1 "a492a1879bee60c29f7af17ef56b45f0d7766241"
34+
URL "https://github.com/soramitsu/soramitsu-hunter/archive/v0.23.253-soramitsu1.tar.gz"
35+
SHA1 2b8e570843e8b6a0c96d70a8d312dda425fa52a9
3436
LOCAL
3537
)

cmake/dependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ find_package(GMock CONFIG REQUIRED)
55

66
# https://docs.hunter.sh/en/latest/packages/pkg/Boost.html
77
hunter_add_package(Boost COMPONENTS random filesystem program_options)
8-
find_package(Boost CONFIG REQUIRED random filesystem program_options)
8+
find_package(Boost CONFIG REQUIRED random filesystem program_options)
99

1010
# added from hunter_config
11-
hunter_add_package(GSL)
11+
hunter_add_package(Microsoft.GSL)
1212

1313
# https://www.openssl.org/
1414
hunter_add_package(OpenSSL)

0 commit comments

Comments
 (0)