File tree 3 files changed +23
-21
lines changed
3 files changed +23
-21
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ BZIP2_VERSION=1.0.8
12
12
LIBARCHIVE_VERSION=3.7.2
13
13
FLAC_VERSION=1.4.3
14
14
LIBUNWIND_VERSION=1.7.2
15
- # BENCHMARK_VERSION=1.8.2
15
+ BENCHMARK_VERSION=1.8.3
16
16
17
17
RETRY=0
18
18
while true ; do
@@ -32,7 +32,7 @@ wget https://sourceware.org/pub/bzip2/bzip2-${BZIP2_VERSION}.tar.gz
32
32
wget https://github.com/libarchive/libarchive/releases/download/v${LIBARCHIVE_VERSION} /libarchive-${LIBARCHIVE_VERSION} .tar.xz
33
33
wget https://github.com/xiph/flac/releases/download/${FLAC_VERSION} /flac-${FLAC_VERSION} .tar.xz
34
34
wget https://github.com/libunwind/libunwind/releases/download/v${LIBUNWIND_VERSION} /libunwind-${LIBUNWIND_VERSION} .tar.gz
35
- # wget https://github.com/google/benchmark/archive/refs/tags/v${BENCHMARK_VERSION}.tar.gz
35
+ wget https://github.com/google/benchmark/archive/refs/tags/v${BENCHMARK_VERSION} .tar.gz
36
36
37
37
for COMPILER in clang gcc; do
38
38
if [[ " $COMPILER " == " clang" ]]; then
@@ -85,14 +85,14 @@ for COMPILER in clang gcc; do
85
85
make -j$( nproc)
86
86
make install
87
87
88
- # cd "$HOME/pkgs"
89
- # tar xf v${BENCHMARK_VERSION}.tar.gz
90
- # cd benchmark-${BENCHMARK_VERSION}
91
- # mkdir build
92
- # cd build
93
- # cmake .. -DBENCHMARK_DOWNLOAD_DEPENDENCIES=1 -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR"
94
- # make -j$(nproc)
95
- # make install
88
+ cd " $HOME /pkgs/ $COMPILER "
89
+ tar xf v${BENCHMARK_VERSION} .tar.gz
90
+ cd benchmark-${BENCHMARK_VERSION}
91
+ mkdir build
92
+ cd build
93
+ cmake .. -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_INSTALL_PREFIX=" $INSTALL_DIR "
94
+ make -j$( nproc)
95
+ make install
96
96
done
97
97
98
98
cd " $HOME "
Original file line number Diff line number Diff line change @@ -766,17 +766,15 @@ if(WITH_TESTS)
766
766
endif ()
767
767
768
768
if (WITH_BENCHMARKS)
769
- if (NOT STATIC_BUILD_DO_NOT_USE)
770
- find_package (benchmark 1.8)
771
- if (benchmark_FOUND)
772
- add_executable (dwarfs_benchmark test /dwarfs_benchmark.cpp)
773
- target_link_libraries (dwarfs_benchmark test_helpers benchmark::benchmark)
774
- list (APPEND BINARY_TARGETS dwarfs_benchmark)
775
-
776
- add_executable (multiversioning_benchmark test /multiversioning_benchmark.cpp)
777
- target_link_libraries (multiversioning_benchmark test_helpers benchmark::benchmark)
778
- list (APPEND BINARY_TARGETS multiversioning_benchmark)
779
- endif ()
769
+ find_package (benchmark 1.8)
770
+ if (benchmark_FOUND)
771
+ add_executable (dwarfs_benchmark test /dwarfs_benchmark.cpp)
772
+ target_link_libraries (dwarfs_benchmark test_helpers benchmark::benchmark)
773
+ list (APPEND BINARY_TARGETS dwarfs_benchmark)
774
+
775
+ add_executable (multiversioning_benchmark test /multiversioning_benchmark.cpp)
776
+ target_link_libraries (multiversioning_benchmark test_helpers benchmark::benchmark)
777
+ list (APPEND BINARY_TARGETS multiversioning_benchmark)
780
778
endif ()
781
779
782
780
add_executable (segmenter_benchmark test /segmenter_benchmark.cpp)
Original file line number Diff line number Diff line change @@ -148,6 +148,10 @@ endif()
148
148
if (WITH_BENCHMARKS)
149
149
find_package (benchmark 1.8)
150
150
if (benchmark_FOUND)
151
+ if (STATIC_BUILD_DO_NOT_USE)
152
+ add_link_options (-static -static -libgcc)
153
+ endif ()
154
+
151
155
add_executable (ricepp_benchmark ricepp_benchmark.cpp)
152
156
target_link_libraries (ricepp_benchmark ricepp benchmark::benchmark)
153
157
You can’t perform that action at this time.
0 commit comments