diff options
author | Juro Bystricky <juro.bystricky@intel.com> | 2019-06-27 07:25:06 -0700 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-06-27 12:16:35 -0700 |
commit | 0dda10e3a9b3de17deccd4b66495a020307df68b (patch) | |
tree | 1d6bc15e47bcb6bccdc10537350472bcec120009 | |
parent | 0a81e30478ed461e216e2e81eab25bd9daf18a69 (diff) |
GTK3/Benchmarks disable guibench only
GTK3 build inadvertably disabled all benchmarking.
At present, the GTK3 build intentionally avoids building of "guibench"
due to non-trivial changes from GTK2 to GTK3.
However, all other benchmarks were disabled as well.
This was not by design, as non-gui benchmarks have no GTK3
dependencies.
The reason benchmarks were diasbled (did not show up in the menus)
was that the code for "benchark_gui" still referenced the missing "guibench"
routine. This routine was not present in the "benchmark.so", so the library
would not load due to the missing entry point.
This patch addresses the issue. All benchmarks (except guibench)
show/work fine with GTK3.
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | modules/benchmark/benches.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fc78df39..67cb03c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,7 +170,6 @@ set(MODULE_benchmark_SOURCES_GTKANY modules/benchmark/blowfish.c modules/benchmark/blowfish2.c modules/benchmark/cryptohash.c - modules/benchmark/drawing.c modules/benchmark/fbench.c modules/benchmark/fftbench.c modules/benchmark/fft.c @@ -182,6 +181,7 @@ set(MODULE_benchmark_SOURCES_GTKANY modules/benchmark/zlib.c ) set(MODULE_benchmark_SOURCES_GTK2 + modules/benchmark/drawing.c modules/benchmark/guibench.c ) if (HARDINFO_GTK3) diff --git a/modules/benchmark/benches.c b/modules/benchmark/benches.c index 2cb8ee9c..6343d95b 100644 --- a/modules/benchmark/benches.c +++ b/modules/benchmark/benches.c @@ -54,6 +54,7 @@ BENCH_SCAN_SIMPLE(scan_cryptohash, benchmark_cryptohash, BENCHMARK_CRYPTOHASH); BENCH_SCAN_SIMPLE(scan_fib, benchmark_fib, BENCHMARK_FIB); BENCH_SCAN_SIMPLE(scan_zlib, benchmark_zlib, BENCHMARK_ZLIB); +#if !GTK_CHECK_VERSION(3,0,0) void scan_gui(gboolean reload) { SCAN_START(); @@ -73,6 +74,7 @@ void scan_gui(gboolean reload) } SCAN_END(); } +#endif static ModuleEntry entries[] = { {N_("CPU Blowfish (Single-thread)"), "blowfish.png", callback_bfsh_single, scan_bfsh_single, MODULE_FLAG_NONE}, |