Skip to content

Commit

Permalink
skip gxhash on AES missing
Browse files Browse the repository at this point in the history
Fixes GH #304
  • Loading branch information
rurban committed Dec 12, 2024
1 parent e44898a commit bebfeaf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,10 @@ else()
set(T1HA_SRC t1ha/t1ha0.c t1ha/t1ha1.c t1ha/t1ha2.c)
endif(AES_FOUND AND (PROCESSOR_FAMILY STREQUAL "Intel"))

if(AES_FOUND)
set(GX_SRC gxhash.c)
endif(AES_FOUND)

if(SHA_FOUND)
# todo: arm, power
set(SHA_SRC SHA-Intrinsics/sha1-x86.c SHA-Intrinsics/sha256-x86.c)
Expand Down Expand Up @@ -696,7 +700,7 @@ add_library(
beamsplitter.cpp
discohash_512.cpp
xxhash.c
gxhash.c
${GX_SRC}
metrohash/metrohash64.cpp
metrohash/metrohash128.cpp
cmetrohash64.c
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ SMhasher
| [k-hashv64](doc/k-hashv64.txt) | 9251.05 | 51.72 | 251.83 (2) |1279 | |
| [komihash](doc/komihash.txt) | 12179.74 | 33.23 | 224.80 (2) |1323 | |
| [polymur](doc/polymur.txt) | 9913.53 | 41.68 | 232.56 (3) |1128 | |
| [gxhash64](doc/gxhash64.txt) | 48919.73 | 36.61 | 236.98 (3) | | |
| [gxhash64](doc/gxhash64.txt) | 48919.73 | 36.61 | 236.98 (3) | | AES only |

The sortable table variants:

Expand Down
4 changes: 3 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,9 @@ HashInfo g_hashes[] =
{ farmhash64_c_test, 64, FARM64_VERIF, "farmhash64_c", "farmhash64_with_seed (C99)", GOOD, {} },
{ farmhash128_c_test, 128, FARM128_VERIF,"farmhash128_c", "farmhash128_with_seed (C99)", GOOD, {} },
#endif
{ gxhash64_test, 64, 0x9189E456, "gxhash64", "gxHash, 64-bit", GOOD, {} },
#ifdef HAVE_AESNI
{ gxhash64_test, 64, 0x9189E456, "gxhash64", "gxHash, 64-bit, AES-only", GOOD, {} },
#endif
{ xxHash64_test, 64, 0x024B7CF4, "xxHash64", "xxHash, 64-bit", GOOD, {} },
#if 0
{ xxhash256_test, 64, 0x024B7CF4, "xxhash256", "xxhash256, 64-bit unportable", GOOD, {} },
Expand Down

0 comments on commit bebfeaf

Please sign in to comment.