build and test for direct_hash
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HERE=$(cd "$(dirname "$0")" && pwd)
|
||||
ROOT=$(cd "$HERE/../.." && pwd)
|
||||
BUILD="$HERE/build"
|
||||
mkdir -p "$BUILD"
|
||||
touch "$BUILD/rpmlib.h" "$BUILD/system.h"
|
||||
cp "$HERE/../roaring_bitmap/set.h" "$BUILD/set.h"
|
||||
|
||||
CFLAGS=(-O2 -std=gnu11 -D_GNU_SOURCE -Wall -Wextra -Werror -I"$BUILD")
|
||||
COMPAT=(-include "$ROOT/scripts/rpmsetcmp/newset_compat.h")
|
||||
|
||||
for tool in mkset setcmp; do
|
||||
cc "${CFLAGS[@]}" "${COMPAT[@]}" \
|
||||
"$ROOT/reimplement/set9.c" "$ROOT/scripts/rpmsetcmp/$tool.c" \
|
||||
-o "$BUILD/$tool-set9"
|
||||
cc "${CFLAGS[@]}" "${COMPAT[@]}" \
|
||||
"$HERE/hash_set.c" "$ROOT/scripts/rpmsetcmp/$tool.c" \
|
||||
-o "$BUILD/$tool-direct"
|
||||
done
|
||||
|
||||
cc "${CFLAGS[@]}" -fPIC -shared "${COMPAT[@]}" \
|
||||
"$ROOT/reimplement/set9.c" -o "$BUILD/libset9.so"
|
||||
cc "${CFLAGS[@]}" -fPIC -shared "${COMPAT[@]}" \
|
||||
"$HERE/hash_set.c" -o "$BUILD/libdirect-hash.so"
|
||||
|
||||
printf 'Built tools and benchmark libraries in %s\n' "$BUILD"
|
||||
Reference in New Issue
Block a user