diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2021-10-24 10:45:10 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2021-10-24 10:48:21 +0300 |
commit | 7bc9121746499f5c207cdd4c20893f5ab60c5952 (patch) | |
tree | 00d67f92a258ac9de7f33ed311ec636ea64bc976 /dev-libs/leveldb/files | |
parent | dev-db/pgadmin4: add upper bound on psycopg version (diff) | |
download | gentoo-7bc9121746499f5c207cdd4c20893f5ab60c5952.tar.gz gentoo-7bc9121746499f5c207cdd4c20893f5ab60c5952.tar.bz2 gentoo-7bc9121746499f5c207cdd4c20893f5ab60c5952.zip |
dev-libs/leveldb: remove test dependency on dev-cpp/benchmark
Only one test executable is using benchmark, and that is only for a
badly placed benchmark. So just patch it out.
dev-cpp/benchmark is problematic to keyword for multiple arches
(for example sparc #762727), so it is better to just patch it out.
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-libs/leveldb/files')
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.23-remove-benchmark-dep.patch | 44 | ||||
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch | 3 |
2 files changed, 45 insertions, 2 deletions
diff --git a/dev-libs/leveldb/files/leveldb-1.23-remove-benchmark-dep.patch b/dev-libs/leveldb/files/leveldb-1.23-remove-benchmark-dep.patch new file mode 100644 index 000000000000..be5ce7386ed4 --- /dev/null +++ b/dev-libs/leveldb/files/leveldb-1.23-remove-benchmark-dep.patch @@ -0,0 +1,44 @@ +Only one test executable is using benchmark, and that is only for a badly +placed benchmark. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -323,7 +323,7 @@ if(LEVELDB_BUILD_TESTS) + + "${test_file}" + ) +- target_link_libraries("${test_target_name}" leveldb gmock gtest benchmark) ++ target_link_libraries("${test_target_name}" leveldb gmock gtest) + target_compile_definitions("${test_target_name}" + PRIVATE + ${LEVELDB_PLATFORM_NAME}=1 +--- a/db/db_test.cc ++++ b/db/db_test.cc +@@ -9,7 +9,6 @@ + #include <string> + + #include "gtest/gtest.h" +-#include "benchmark/benchmark.h" + #include "db/db_impl.h" + #include "db/filename.h" + #include "db/version_set.h" +@@ -2301,6 +2300,7 @@ std::string MakeKey(unsigned int num) { + return std::string(buf); + } + ++#if 0 + static void BM_LogAndApply(benchmark::State& state) { + const int num_base_files = state.range(0); + +@@ -2357,10 +2357,10 @@ static void BM_LogAndApply(benchmark::State& state) { + } + + BENCHMARK(BM_LogAndApply)->Arg(1)->Arg(100)->Arg(10000)->Arg(100000); ++#endif + } // namespace leveldb + + int main(int argc, char** argv) { + testing::InitGoogleTest(&argc, argv); +- benchmark::RunSpecifiedBenchmarks(); + return RUN_ALL_TESTS(); + } diff --git a/dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch b/dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch index 232d74aa2ccd..8165050048c9 100644 --- a/dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch +++ b/dev-libs/leveldb/files/leveldb-1.23-system-testdeps.patch @@ -1,6 +1,6 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -296,20 +296,12 @@ +@@ -296,20 +296,11 @@ set(build_gmock ON) # This project is tested using GoogleTest. @@ -19,7 +19,6 @@ - set_property(TARGET gmock - APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers) - endif(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS) -+ find_package(benchmark REQUIRED) function(leveldb_test test_file) get_filename_component(test_target_name "${test_file}" NAME_WE) |