Pārlūkot izejas kodu

Merge pull request #853 from cmumford:benchmark

PiperOrigin-RevId: 344909677
master
Chris Mumford pirms 4 gadiem
vecāks
revīzija
28df52115d
2 mainītis faili ar 9 papildinājumiem un 1 dzēšanām
  1. +3
    -0
      .gitmodules
  2. +6
    -1
      CMakeLists.txt

+ 3
- 0
.gitmodules Parādīt failu

@ -1,3 +1,6 @@
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
[submodule "third_party/benchmark"]
path = third_party/benchmark
url = https://github.com/google/benchmark

+ 6
- 1
CMakeLists.txt Parādīt failu

@ -298,6 +298,11 @@ if(LEVELDB_BUILD_TESTS)
# This project is tested using GoogleTest.
add_subdirectory("third_party/googletest")
# This project uses Google benchmark for benchmarking.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
add_subdirectory("third_party/benchmark")
# GoogleTest triggers a missing field initializers warning.
if(LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS)
set_property(TARGET gtest
@ -318,7 +323,7 @@ if(LEVELDB_BUILD_TESTS)
"${test_file}"
)
target_link_libraries("${test_target_name}" leveldb gmock gtest)
target_link_libraries("${test_target_name}" leveldb gmock gtest benchmark)
target_compile_definitions("${test_target_name}"
PRIVATE
${LEVELDB_PLATFORM_NAME}=1

Notiek ielāde…
Atcelt
Saglabāt