Skip to content

Commit 7aa0720

Browse files
committed
Fix configure errors when with FetchContent to fetch dependencies
1 parent f717670 commit 7aa0720

File tree

10 files changed

+7
-15
lines changed

10 files changed

+7
-15
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
cmake -DCMAKE_CXX_COMPILER=g++-10
2121
-DCMAKE_BUILD_TYPE=Debug
2222
-DBENCODE_BUILD_TESTS=ON
23-
-DBENCODE_BUILD_TESTS_COVERAGE=ON
23+
-DBENCODE_ENABLE_COVERAGE=ON
2424
-DBENCODE_BUILD_DOCS=OFF
2525
-DBENCODE_BUILD_BENCHMARKS=OFF ..
2626
- name: build

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ if (BENCODE_ENABLE_INSTALL)
127127

128128

129129
if (NOT expected-lite_FOUND)
130-
message(STATUS "Adding fmt to install set")
131-
install(TARGETS expected
130+
message(STATUS "Adding expected-lite to install set")
131+
install(TARGETS expected-lite
132132
EXPORT ${bencode_targets_export_name}
133133
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
134134
endif()
135135

136136
if (NOT gsl-lite_FOUND)
137137
message(STATUS "Adding gsl-lite to install set")
138-
install(TARGETS gsl::gsl-lite gsl::gsl-lite-v1
138+
install(TARGETS gsl-lite-v1
139139
EXPORT ${bencode_targets_export_name}
140140
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
141141
endif()

benchmark/comparison/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ foreach(target "benchmark-fbdtemme-bencode"
2525

2626
endforeach(target)
2727

28-
target_link_libraries(benchmark-arvidn-libtorrent PRIVATE LibtorrentRasterbar::torrent-rasterbar)
28+
target_link_libraries(benchmark-arvidn-libtorrent PRIVATE torrent-rasterbar)
2929

benchmark/comparison/arvidn_libtorrent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include <benchmark/benchmark.h>
99
#include <span>
10-
#include "libtorrent/bdecode.hpp"
10+
#include <libtorrent/bdecode.hpp>
1111

1212
#include "resources.hpp"
1313

external/catch2.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ else()
88
Catch2
99
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
1010
GIT_TAG v2.x
11-
EXCLUDE_FROM_ALL TRUE
1211
)
1312
FetchContent_MakeAvailable(Catch2)
14-
set(CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/contrib" ${CMAKE_MODULE_PATH})
13+
list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/contrib")
1514
endif()

external/expected-lite.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ else()
99
expected-lite
1010
GIT_REPOSITORY https://github.com/martinmoene/expected-lite.git
1111
GIT_TAG master
12-
EXCLUDE_FROM_ALL TRUE
1312
)
1413
FetchContent_MakeAvailable(expected-lite)
1514
endif()

external/fmt.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ else()
99
fmt
1010
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
1111
GIT_TAG master
12-
EXCLUDE_FROM_ALL TRUE
1312
)
1413
set(FMT_INSTALL ON)
1514
set(BUILD_SHARED_LIBS ON)

external/gsl-lite.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ else()
99
gsl-lite
1010
GIT_REPOSITORY https://github.com/gsl-lite/gsl-lite.git
1111
GIT_TAG master
12-
EXCLUDE_FROM_ALL TRUE
1312
)
1413
FetchContent_MakeAvailable(gsl-lite)
15-
target_compile_options(gsl::gsl-lite-v1 gsl_CONFIG_DEFAULTS_VERSION 1)
1614
endif()

external/libtorrent.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ else()
99
libtorrent-rasterbar
1010
GIT_REPOSITORY https://github.com/arvidn/libtorrent.git
1111
GIT_TAG RC_2_0
12-
EXCLUDE_FROM_ALL TRUE
1312
)
1413
FetchContent_MakeAvailable(libtorrent-rasterbar)
15-
add_library(LibtorrentRasterbar::torrent-rasterbar ALIAS torrent-rasterbar)
1614
endif()

tests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cmake_minimum_required(VERSION 3.14)
22

33
include(../external/catch2.cmake)
4-
include(../external/expected-lite.cmake)
54

65
include(Catch)
76

0 commit comments

Comments
 (0)