Skip to content

Commit 1bbd6a3

Browse files
committed
Exclude subprojects from all target.
1 parent d1e4b74 commit 1bbd6a3

File tree

11 files changed

+48
-11
lines changed

11 files changed

+48
-11
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ elseif(BENCODE_FROM_CHARS_STRING_IMPL STREQUAL avx2)
7979
endif()
8080

8181

82-
target_compile_definitions(
82+
target_compile_definitions(
8383
bencode INTERFACE
8484
BENCODE_FROM_CHARS_INTEGER_IMPL=${BENCODE_FROM_CHARS_INTEGER_IMPL}
8585
BENCODE_FROM_CHARS_STRING_IMPL=${BENCODE_FROM_CHARS_STRING_IMPL}

benchmark/plots/comparison-benchmark.ipynb

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,8 @@
242242
" --benchmark_out=\"benchmark-s3ponia-bencodeparser.json\"\n",
243243
"```"
244244
],
245-
"cell_type": "code",
246-
"metadata": {},
247-
"execution_count": null,
248-
"outputs": []
245+
"cell_type": "markdown",
246+
"metadata": {}
249247
},
250248
{
251249
"source": [],
@@ -272,15 +270,29 @@
272270
},
273271
{
274272
"cell_type": "code",
275-
"execution_count": 61,
273+
"execution_count": 2,
276274
"metadata": {},
277-
"outputs": [],
275+
"outputs": [
276+
{
277+
"output_type": "error",
278+
"ename": "FileNotFoundError",
279+
"evalue": "[Errno 2] No such file or directory: 'benchmark-fbdtemme-bencode.json'",
280+
"traceback": [
281+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
282+
"\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
283+
"\u001b[0;32m<ipython-input-2-fa4287b24e17>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 15\u001b[0m ]\n\u001b[1;32m 16\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 17\u001b[0;31m df = pd.concat([\n\u001b[0m\u001b[1;32m 18\u001b[0m \u001b[0mfilter_results\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mload_json_benchmarks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlib_name\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlib_name\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mlibraries\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m ])\n",
284+
"\u001b[0;32m<ipython-input-2-fa4287b24e17>\u001b[0m in \u001b[0;36m<listcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 17\u001b[0m df = pd.concat([\n\u001b[0;32m---> 18\u001b[0;31m \u001b[0mfilter_results\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mload_json_benchmarks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlib_name\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlib_name\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mlibraries\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 19\u001b[0m ])\n",
285+
"\u001b[0;32m~/Documents/project/torrent/bencode/benchmark/plots/utils.py\u001b[0m in \u001b[0;36mload_json_benchmarks\u001b[0;34m(file_path)\u001b[0m\n\u001b[1;32m 8\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mload_json_benchmarks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mPath\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mDataFrame\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[0;34m\"\"\"Load the benchmark results from a google benchmark json file.\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 10\u001b[0;31m \u001b[0;32mwith\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfile_path\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"r\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 11\u001b[0m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
286+
"\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'benchmark-fbdtemme-bencode.json'"
287+
]
288+
}
289+
],
278290
"source": [
279291
"libraries = [\n",
280292
" (\"benchmark-fbdtemme-bencode.json\", \"fbdtemme/bencode\"),\n",
281293
" (\"benchmark-jimporter-bencode.json\", \"jimporter/bencode\"),\n",
282294
" (\"benchmark-jimporter-bencode-boost.json\", \"jimporter/bencode (boost)\"),\n",
283-
" (\"benchmark-arvidn-libtorrent.json\", \"arvidn/libtorrent\"),\n",
295+
" # (\"benchmark-arvidn-libtorrent.json\", \"arvidn/libtorrent\"),\n",
284296
" (\"benchmark-s3rvac-cpp-bencoding.json\", \"s3rvac/cpp-bencoding\"),\n",
285297
" (\"benchmark-rakshasa-libtorrent.json\", \"rakshasa/libtorrent\"),\n",
286298
" (\"benchmark-kriben-bencode.json\", \"kriben/bencode\"),\n",
@@ -402,7 +414,7 @@
402414
"ax.set_xlabel(\"Benchmark\")\n",
403415
"\n",
404416
"ax.figure.tight_layout()\n",
405-
"ax.figure.savefig(\"../../docs/images/benchmark-decoding-value.svg\")"
417+
"# ax.figure.savefig(\"../../docs/images/benchmark-decoding-value.svg\")"
406418
]
407419
},
408420
{
@@ -427,7 +439,7 @@
427439
"ax.set_xlabel(\"Benchmark\")\n",
428440
"\n",
429441
"ax.figure.tight_layout()\n",
430-
"ax.figure.savefig(\"../../docs/images/benchmark-decoding-view.svg\")"
442+
"# ax.figure.savefig(\"../../docs/images/benchmark-decoding-view.svg\")"
431443
]
432444
},
433445
{

external/arvidn-libtorrent.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,10 @@ else()
1111
GIT_TAG RC_2_0
1212
)
1313
FetchContent_MakeAvailable(libtorrent-rasterbar)
14+
15+
if(IS_DIRECTORY "${libtorrent-rasterbar_SOURCE_DIR}")
16+
set_property(DIRECTORY ${libtorrent-rasterbar_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL YES)
17+
endif()
18+
1419
endif()
1520

external/benchmark.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@ else()
1212
set(BENCHMARK_ENABLE_TESTING OFF)
1313
set(BENCHMARK_ENABLE_INSTALL OFF)
1414
FetchContent_MakeAvailable(benchmark)
15+
16+
if(IS_DIRECTORY "${benchmark_SOURCE_DIR}")
17+
set_property(DIRECTORY ${benchmark_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL YES)
18+
endif()
1519
endif()
1620

external/catch2.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ else()
1111
)
1212
FetchContent_MakeAvailable(Catch2)
1313
list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/contrib")
14+
15+
if(IS_DIRECTORY "${Catch2_SOURCE_DIR}")
16+
set_property(DIRECTORY ${Catch2_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL YES)
17+
endif()
1418
endif()

external/expected-lite.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ else()
1111
GIT_TAG master
1212
)
1313
FetchContent_MakeAvailable(expected-lite)
14+
if(IS_DIRECTORY "${expected-lite_SOURCE_DIR}")
15+
set_property(DIRECTORY ${expected-lite_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL YES)
16+
endif()
1417
endif()

external/fmt.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ else()
1010
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
1111
GIT_TAG master
1212
)
13+
#Need to keep this on to make imports from build tree work
1314
set(FMT_INSTALL ON)
1415
set(BUILD_SHARED_LIBS ON)
16+
set(FMT_TEST OFF)
1517
FetchContent_MakeAvailable(fmt)
1618
endif()
1719

external/gsl-lite.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ else()
1111
GIT_TAG master
1212
)
1313
FetchContent_MakeAvailable(gsl-lite)
14+
if(IS_DIRECTORY "${gsl-lite_SOURCE_DIR}")
15+
set_property(DIRECTORY ${gsl-lite_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL YES)
16+
endif()
1417
endif()

external/jimporter-bencode.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ FetchContent_Declare(
77
GIT_TAG master
88
)
99
FetchContent_MakeAvailable(jimporter-bencode)
10-
1110
add_library(jimporter-bencode INTERFACE)
1211
file(COPY "${jimporter-bencode_SOURCE_DIR}/include/bencode.hpp"
1312
DESTINATION "${jimporter-bencode_SOURCE_DIR}/include/jimporter")

external/outputenable-bencode.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ set(GSUPPL_ROOT ${microsoft-gsl_SOURCE_DIR})
1919
set(BUILD_HEADER_ONLY ON)
2020
set(ENABLE_TESTING OFF)
2121
FetchContent_MakeAvailable(outputenable-chopsuey)
22+
if(IS_DIRECTORY "${outputenable-chopsuey_SOURCE_DIR}")
23+
set_property(DIRECTORY ${outputenable-chopsuey_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL YES)
24+
endif()
2225
unset(HEADER_ONLY)
2326
unset(ENABLE_TESTING)
2427

2528
FetchContent_Declare(
2629
outputenable-bencode
2730
GIT_REPOSITORY https://gitlab.com/outputenable/bencode.git
2831
GIT_TAG master
32+
EXCLUDE_FROM_ALL TRUE
2933
)
3034
set(CHOPSUEY_ROOT ${outputenable-chopsuey_BINARY_DIR})
3135

0 commit comments

Comments
 (0)