diff --git a/.gitmodules b/.gitmodules index c1d9a0bf26..6417e2174e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -37,3 +37,6 @@ [submodule "submodules/fmt"] path = submodules/fmt url = https://github.com/fmtlib/fmt.git +[submodule "submodules/benchmark"] + path = submodules/benchmark + url = https://github.com/google/benchmark.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 10d92541ca..436e1cffc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -737,10 +737,15 @@ if(NANO_TEST OR RAIBLOCKS_TEST) gtest PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/submodules/gtest/googletest/include") + set(BENCHMARK_ENABLE_TESTING OFF) + add_subdirectory(submodules/benchmark) + add_subdirectory(nano/test_common) add_subdirectory(nano/core_test) add_subdirectory(nano/rpc_test) add_subdirectory(nano/slow_test) + add_subdirectory(nano/benchmarks) + add_custom_target( all_tests COMMAND echo "BATCH BUILDING TESTS" diff --git a/nano/benchmarks/CMakeLists.txt b/nano/benchmarks/CMakeLists.txt new file mode 100644 index 0000000000..97aa9665bb --- /dev/null +++ b/nano/benchmarks/CMakeLists.txt @@ -0,0 +1,5 @@ +add_executable(benchmarks entry.cpp) + +target_link_libraries(benchmarks test_common benchmark::benchmark) + +include_directories(${CMAKE_SOURCE_DIR}/submodules) diff --git a/nano/benchmarks/entry.cpp b/nano/benchmarks/entry.cpp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/submodules/benchmark b/submodules/benchmark new file mode 160000 index 0000000000..eaafe694d2 --- /dev/null +++ b/submodules/benchmark @@ -0,0 +1 @@ +Subproject commit eaafe694d27f31fe05dd9d055da1e57c8d37a004