Skip to content

Commit

Permalink
Update 'xxHash' to v0.8.2 (#721)
Browse files Browse the repository at this point in the history
* Rename from xxhash
  • Loading branch information
hjmallon authored Nov 1, 2023
1 parent 85caa79 commit 474bb68
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 42 deletions.
2 changes: 1 addition & 1 deletion cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@ hunter_default_version(xrandr VERSION 1.3.2)
hunter_default_version(xrender VERSION 0.9.7)
hunter_default_version(xshmfence VERSION 1.3)
hunter_default_version(xtrans VERSION 1.4.0)
hunter_default_version(xxHash VERSION 0.8.2)
hunter_default_version(xxf86vm VERSION 1.1.2)
hunter_default_version(xxhash VERSION 0.6.5-p0)
hunter_default_version(yaml-cpp VERSION 0.6.3)
hunter_default_version(zip VERSION 0.1.15)
hunter_default_version(zlog VERSION 1.2.14)
Expand Down
50 changes: 50 additions & 0 deletions cmake/projects/xxHash/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright (c) 2016-2018, Ruslan Baratov
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)
include(hunter_source_subdir)

hunter_add_version(
PACKAGE_NAME
xxHash
VERSION
0.6.5-p0
URL
"https://github.com/hunter-packages/xxHash/archive/0.6.5-p0.tar.gz"
SHA1
7d84575a45360d5c5c075ceb3fc1eb6b334aa5a4
)

hunter_add_version(
PACKAGE_NAME
xxHash
VERSION
0.8.2
URL
"https://github.com/Cyan4973/xxHash/archive/v0.8.2.tar.gz"
SHA1
8df702581ebc48a5e05be0f1ede6e1e9139e4da1
)

if(HUNTER_xxHash_VERSION VERSION_GREATER_EQUAL 0.8.2)
hunter_source_subdir(
xxHash
SOURCE_SUBDIR "cmake_unofficial"
)

hunter_cmake_args(
xxHash
CMAKE_ARGS
XXHASH_BUILD_XXHSUM=OFF
)
endif()

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(xxHash)
hunter_download(PACKAGE_NAME xxHash)
24 changes: 0 additions & 24 deletions cmake/projects/xxhash/hunter.cmake

This file was deleted.

10 changes: 5 additions & 5 deletions docs/packages/pkg/xxhash.rst → docs/packages/pkg/xxHash.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
.. spelling::

xxhash
xxHash

.. index::
single: crypto ; xxhash
single: crypto ; xxHash

.. _pkg.xxhash:
.. _pkg.xxHash:

xxhash
xxHash
======

- `Official <https://github.com/Cyan4973/xxHash>`__
- `Hunterized <https://github.com/hunter-packages/xxHash>`__
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/xxhash/CMakeLists.txt>`__
- Added by `Warchant <https://github.com/Warchant>`__ (`pr-1738 <https://github.com/ruslo/hunter/pull/1738>`__)

.. literalinclude:: /../examples/xxhash/CMakeLists.txt
.. literalinclude:: /../examples/xxHash/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ cmake_minimum_required(VERSION 3.5)
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(download-xxhash)
project(download-xxHash)

# DOCUMENTATION_START {
hunter_add_package(xxhash)
find_package(xxhash CONFIG REQUIRED)
hunter_add_package(xxHash)
find_package(xxHash CONFIG REQUIRED)

add_executable(boo boo.cpp)
target_link_libraries(boo PUBLIC xxhash)
target_link_libraries(boo PUBLIC xxHash::xxhash)
# DOCUMENTATION_END }
11 changes: 11 additions & 0 deletions examples/xxHash/boo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <xxhash.h>
#include <iostream>

int main() {
XXH64_state_t* const state = XXH64_createState();
XXH64_update(state, "hello", 5);
XXH64_hash_t const hash = XXH64_digest(state);
std::cout << std::hex << hash << std::endl;
XXH64_freeState(state);
return 0;
}
8 changes: 0 additions & 8 deletions examples/xxhash/boo.cpp

This file was deleted.

0 comments on commit 474bb68

Please sign in to comment.