Move most of arena_allocator.hpp out of the header
This commit is contained in:
@@ -47,7 +47,8 @@ include_directories(src)
|
||||
|
||||
find_package(weaseljson REQUIRED)
|
||||
|
||||
set(SOURCES src/main.cpp src/config.cpp src/commit_request.cpp)
|
||||
set(SOURCES src/main.cpp src/config.cpp src/commit_request.cpp
|
||||
src/arena_allocator.cpp)
|
||||
|
||||
add_executable(weaseldb ${SOURCES})
|
||||
target_link_libraries(weaseldb Threads::Threads toml11::toml11 weaseljson)
|
||||
@@ -58,38 +59,41 @@ enable_testing()
|
||||
add_library(test_data STATIC benchmarks/test_data.cpp)
|
||||
target_include_directories(test_data PUBLIC benchmarks)
|
||||
|
||||
add_executable(test_arena_allocator tests/test_arena_allocator.cpp)
|
||||
add_executable(test_arena_allocator tests/test_arena_allocator.cpp
|
||||
src/arena_allocator.cpp)
|
||||
target_link_libraries(test_arena_allocator doctest::doctest)
|
||||
target_include_directories(test_arena_allocator PRIVATE src)
|
||||
|
||||
add_executable(test_commit_request tests/test_commit_request.cpp
|
||||
src/commit_request.cpp)
|
||||
add_executable(
|
||||
test_commit_request tests/test_commit_request.cpp src/commit_request.cpp
|
||||
src/arena_allocator.cpp)
|
||||
target_link_libraries(test_commit_request doctest::doctest weaseljson test_data)
|
||||
target_include_directories(test_commit_request PRIVATE src)
|
||||
|
||||
add_executable(bench_arena_allocator benchmarks/bench_arena_allocator.cpp)
|
||||
add_executable(bench_arena_allocator benchmarks/bench_arena_allocator.cpp
|
||||
src/arena_allocator.cpp)
|
||||
target_link_libraries(bench_arena_allocator nanobench)
|
||||
target_include_directories(bench_arena_allocator PRIVATE src)
|
||||
|
||||
add_executable(bench_commit_request benchmarks/bench_commit_request.cpp
|
||||
src/commit_request.cpp)
|
||||
add_executable(
|
||||
bench_commit_request benchmarks/bench_commit_request.cpp
|
||||
src/commit_request.cpp src/arena_allocator.cpp)
|
||||
target_link_libraries(bench_commit_request nanobench weaseljson test_data)
|
||||
target_include_directories(bench_commit_request PRIVATE src)
|
||||
|
||||
add_executable(bench_parser_comparison benchmarks/bench_parser_comparison.cpp
|
||||
src/commit_request.cpp)
|
||||
add_executable(
|
||||
bench_parser_comparison benchmarks/bench_parser_comparison.cpp
|
||||
src/commit_request.cpp src/arena_allocator.cpp)
|
||||
target_link_libraries(bench_parser_comparison nanobench weaseljson test_data
|
||||
nlohmann_json::nlohmann_json)
|
||||
target_include_directories(bench_parser_comparison PRIVATE src)
|
||||
|
||||
# Debug tools
|
||||
add_executable(debug_arena tools/debug_arena.cpp src/commit_request.cpp)
|
||||
add_executable(debug_arena tools/debug_arena.cpp src/commit_request.cpp
|
||||
src/arena_allocator.cpp)
|
||||
target_link_libraries(debug_arena weaseljson)
|
||||
target_include_directories(debug_arena PRIVATE src)
|
||||
|
||||
add_executable(test_multi_block test_multi_block.cpp)
|
||||
target_include_directories(test_multi_block PRIVATE src)
|
||||
|
||||
add_test(NAME arena_allocator_tests COMMAND test_arena_allocator)
|
||||
add_test(NAME commit_request_tests COMMAND test_commit_request)
|
||||
add_test(NAME arena_allocator_benchmarks COMMAND bench_arena_allocator)
|
||||
|
||||
Reference in New Issue
Block a user