Skip to content

Commit 4cedbc5

Browse files
committed
Update googletest and googlebench deps
1 parent 0d5985d commit 4cedbc5

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

bench/get-current.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,40 @@
22

33
#include <cpuinfo.h>
44

5-
static void cpuinfo_get_current_processor(benchmark::State& state) {
5+
static void cpuinfo_get_current_processor_bench(benchmark::State& state) {
66
cpuinfo_initialize();
77
while (state.KeepRunning()) {
88
const cpuinfo_processor* current_processor = cpuinfo_get_current_processor();
99
benchmark::DoNotOptimize(current_processor);
1010
}
1111
}
12-
BENCHMARK(cpuinfo_get_current_processor)->Unit(benchmark::kNanosecond);
12+
BENCHMARK(cpuinfo_get_current_processor_bench)->Unit(benchmark::kNanosecond);
1313

14-
static void cpuinfo_get_current_core(benchmark::State& state) {
14+
static void cpuinfo_get_current_core_bench(benchmark::State& state) {
1515
cpuinfo_initialize();
1616
while (state.KeepRunning()) {
1717
const cpuinfo_core* current_core = cpuinfo_get_current_core();
1818
benchmark::DoNotOptimize(current_core);
1919
}
2020
}
21-
BENCHMARK(cpuinfo_get_current_core)->Unit(benchmark::kNanosecond);
21+
BENCHMARK(cpuinfo_get_current_core_bench)->Unit(benchmark::kNanosecond);
2222

23-
static void cpuinfo_get_current_uarch_index(benchmark::State& state) {
23+
static void cpuinfo_get_current_uarch_index_bench(benchmark::State& state) {
2424
cpuinfo_initialize();
2525
while (state.KeepRunning()) {
2626
const uint32_t uarch_index = cpuinfo_get_current_uarch_index();
2727
benchmark::DoNotOptimize(uarch_index);
2828
}
2929
}
30-
BENCHMARK(cpuinfo_get_current_uarch_index)->Unit(benchmark::kNanosecond);
30+
BENCHMARK(cpuinfo_get_current_uarch_index_bench)->Unit(benchmark::kNanosecond);
3131

32-
static void cpuinfo_get_current_uarch_index_with_default(benchmark::State& state) {
32+
static void cpuinfo_get_current_uarch_index_with_default_bench(benchmark::State& state) {
3333
cpuinfo_initialize();
3434
while (state.KeepRunning()) {
3535
const uint32_t uarch_index = cpuinfo_get_current_uarch_index_with_default(0);
3636
benchmark::DoNotOptimize(uarch_index);
3737
}
3838
}
39-
BENCHMARK(cpuinfo_get_current_uarch_index_with_default)->Unit(benchmark::kNanosecond);
39+
BENCHMARK(cpuinfo_get_current_uarch_index_with_default_bench)->Unit(benchmark::kNanosecond);
4040

4141
BENCHMARK_MAIN();

bench/init.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
#include <cpuinfo.h>
44

5-
static void cpuinfo_initialize(benchmark::State& state) {
5+
static void cpuinfo_initialize_bench(benchmark::State& state) {
66
while (state.KeepRunning()) {
77
cpuinfo_initialize();
88
}
99
}
10-
BENCHMARK(cpuinfo_initialize)->Iterations(1)->Unit(benchmark::kMillisecond);
10+
BENCHMARK(cpuinfo_initialize_bench)->Iterations(1)->Unit(benchmark::kMillisecond);
1111

1212
BENCHMARK_MAIN();

cmake/DownloadGoogleBenchmark.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ PROJECT(googlebenchmark-download NONE)
44

55
INCLUDE(ExternalProject)
66
ExternalProject_Add(googlebenchmark
7-
URL https://github.com/google/benchmark/archive/v1.6.1.zip
8-
URL_HASH SHA256=367e963b8620080aff8c831e24751852cffd1f74ea40f25d9cc1b667a9dd5e45
7+
URL https://github.com/google/benchmark/archive/refs/tags/v1.9.4.tar.gz
8+
URL_HASH SHA256=b334658edd35efcf06a99d9be21e4e93e092bd5f95074c1673d5c8705d95c104
99
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark"
1010
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark"
1111
CONFIGURE_COMMAND ""

cmake/DownloadGoogleTest.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ PROJECT(googletest-download NONE)
44

55
INCLUDE(ExternalProject)
66
ExternalProject_Add(googletest
7-
URL https://github.com/google/googletest/archive/release-1.11.0.zip
8-
URL_HASH SHA256=353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a
7+
URL https://github.com/google/googletest/archive/refs/tags/v1.17.0.zip
8+
URL_HASH SHA256=40d4ec942217dcc84a9ebe2a68584ada7d4a33a8ee958755763278ea1c5e18ff
99
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest"
1010
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest"
1111
CONFIGURE_COMMAND ""

scripts/local-build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88

99
set -e
1010

11+
if [ -d deps/googletest ]; then
12+
rm -rf deps/googletest
13+
fi
14+
if [ -d deps/googlebenchmark-download ]; then
15+
rm -rf deps/googlebenchmark-download
16+
fi
17+
if [ -d deps/googlebenchmark-download ]; then
18+
rm -rf deps/googlebenchmark-download
19+
fi
20+
1121
mkdir -p build/local
1222

1323
CMAKE_ARGS=()

0 commit comments

Comments
 (0)