|
1 | 1 | cmake_minimum_required(VERSION 3.5)
|
2 |
| -project(rosbag2_storage_evaluation) |
3 |
| - |
4 |
| -# Default to C99 |
5 |
| -if(NOT CMAKE_C_STANDARD) |
6 |
| - set(CMAKE_C_STANDARD 99) |
7 |
| -endif() |
8 |
| - |
9 |
| -# Default to C++14 |
10 |
| -if(NOT CMAKE_CXX_STANDARD) |
11 |
| - set(CMAKE_CXX_STANDARD 14) |
12 |
| -endif() |
13 |
| - |
14 |
| -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") |
15 |
| - add_compile_options(-Wall -Wextra -Wpedantic) |
16 |
| -endif() |
17 |
| - |
18 |
| -# find dependencies |
19 |
| -find_package(ament_cmake REQUIRED) |
20 |
| -# uncomment the following section in order to fill in |
21 |
| -# further dependencies manually. |
22 |
| -# find_package(<dependency> REQUIRED) |
23 |
| - |
24 |
| -if(BUILD_TESTING) |
25 |
| - find_package(ament_lint_auto REQUIRED) |
26 |
| - # the following line skips the linter which checks for copyrights |
27 |
| - # remove the line when a copyright and license is present in all source files |
28 |
| - set(ament_cmake_copyright_FOUND TRUE) |
29 |
| - # the following line skips cpplint (only works in a git repo) |
30 |
| - # remove the line when this package is a git repo |
31 |
| - set(ament_cmake_cpplint_FOUND TRUE) |
32 |
| - ament_lint_auto_find_test_dependencies() |
33 |
| -endif() |
34 |
| - |
35 |
| -ament_package() |
| 2 | + |
| 3 | +project(ros2_rosbag_evaluation) |
| 4 | + |
| 5 | +set(CMAKE_CXX_STANDARD 14) |
| 6 | +set(CMAKE_CXX_FLAGS "-O3") |
| 7 | +set(BUILD_SHARED_LIBS ON) |
| 8 | + |
| 9 | +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) |
| 10 | + |
| 11 | +set(common_sources |
| 12 | + src/common/strings.cpp) |
| 13 | + |
| 14 | +set(profiler_sources |
| 15 | + src/profiler/profiler.cpp) |
| 16 | + |
| 17 | +set(sqlite_sources |
| 18 | + src/writer/sqlite/sqlite.cpp |
| 19 | + src/writer/sqlite/sqlite_writer.cpp |
| 20 | + src/writer/sqlite/one_table_sqlite_writer.cpp |
| 21 | + src/writer/sqlite/separate_topic_table_sqlite_writer.cpp) |
| 22 | + |
| 23 | +set(trivial_writer_benchmark_sources |
| 24 | + src/benchmark/writer/trivial/trivial_writer_benchmark.cpp |
| 25 | + src/benchmark/benchmark.cpp |
| 26 | + src/writer/stream/message_stream_writer.cpp |
| 27 | + src/generators/message_generator.cpp) |
| 28 | + |
| 29 | +set(sqlite_writer_benchmark_cmd_sources |
| 30 | + src/benchmark/writer/sqlite/sqlite_writer_benchmark_cmd.cpp |
| 31 | + src/benchmark/writer/sqlite/sqlite_writer_benchmark.cpp |
| 32 | + src/benchmark/benchmark.cpp |
| 33 | + src/generators/message_generator.cpp) |
| 34 | + |
| 35 | +set(small_messages_benchmark_sources |
| 36 | + src/benchmark/small_messages_benchmark.cpp |
| 37 | + src/benchmark/writer/sqlite/sqlite_writer_benchmark.cpp |
| 38 | + src/benchmark/benchmark.cpp |
| 39 | + src/generators/message_generator.cpp) |
| 40 | + |
| 41 | +set(big_messages_benchmark_sources |
| 42 | + src/benchmark/big_messages_benchmark.cpp |
| 43 | + src/benchmark/writer/sqlite/sqlite_writer_benchmark.cpp |
| 44 | + src/benchmark/benchmark.cpp |
| 45 | + src/generators/message_generator.cpp) |
| 46 | + |
| 47 | +set(mixed_messages_benchmark_sources |
| 48 | + src/benchmark/mixed_messages_benchmark.cpp |
| 49 | + src/benchmark/writer/sqlite/sqlite_writer_benchmark.cpp |
| 50 | + src/benchmark/benchmark.cpp |
| 51 | + src/generators/message_generator.cpp) |
| 52 | + |
| 53 | +add_library(common ${common_sources}) |
| 54 | +target_include_directories(common PRIVATE src) |
| 55 | + |
| 56 | +add_library(profiler ${profiler_sources}) |
| 57 | +target_include_directories(profiler PRIVATE src) |
| 58 | + |
| 59 | +add_library(sqlite ${sqlite_sources}) |
| 60 | +target_include_directories(sqlite PRIVATE src) |
| 61 | +target_link_libraries(sqlite sqlite3 common) |
| 62 | + |
| 63 | +add_executable(trivial_writer_benchmark ${trivial_writer_benchmark_sources}) |
| 64 | +target_link_libraries(trivial_writer_benchmark profiler sqlite) |
| 65 | +target_include_directories(trivial_writer_benchmark PRIVATE src) |
| 66 | + |
| 67 | +add_executable(sqlite_writer_benchmark_cmd ${sqlite_writer_benchmark_cmd_sources}) |
| 68 | +target_link_libraries(sqlite_writer_benchmark_cmd profiler sqlite) |
| 69 | +target_include_directories(sqlite_writer_benchmark_cmd PRIVATE src) |
| 70 | + |
| 71 | +add_executable(small_messages_benchmark ${small_messages_benchmark_sources}) |
| 72 | +target_link_libraries(small_messages_benchmark profiler sqlite) |
| 73 | +target_include_directories(small_messages_benchmark PRIVATE src) |
| 74 | + |
| 75 | +add_executable(big_messages_benchmark ${big_messages_benchmark_sources}) |
| 76 | +target_link_libraries(big_messages_benchmark profiler sqlite) |
| 77 | +target_include_directories(big_messages_benchmark PRIVATE src) |
| 78 | + |
| 79 | +add_executable(mixed_messages_benchmark ${mixed_messages_benchmark_sources}) |
| 80 | +target_link_libraries(mixed_messages_benchmark profiler sqlite) |
| 81 | +target_include_directories(mixed_messages_benchmark PRIVATE src) |
0 commit comments