-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[builtins] download instead of bundle xxhash and bump from 0.8.0 to 0.8.3 #21806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ferdymercury
wants to merge
5
commits into
root-project:master
Choose a base branch
from
ferdymercury:xxh
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6652197
[builtins] download instead of bundle xxhash
ferdymercury d12f1df
[ci] turn on builtin_xxhash for CI testing on Linux
ferdymercury 26758bf
[cmake] simplify dependency check
ferdymercury 83118a0
[core] rm duplicate find_package
ferdymercury e1a3579
[xxhash] simplify
ferdymercury File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,60 @@ | ||
| # Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. | ||
| # Copyright (C) 1995-2026, Rene Brun and Fons Rademakers. | ||
| # All rights reserved. | ||
| # | ||
| # For the licensing terms see $ROOTSYS/LICENSE. | ||
| # For the list of contributors see $ROOTSYS/README/CREDITS. | ||
|
|
||
| project(xxhash C) | ||
|
|
||
| unset(xxHash_FOUND CACHE) | ||
| unset(xxHash_FOUND PARENT_SCOPE) | ||
| set(xxHash_FOUND TRUE CACHE BOOL "" FORCE) | ||
|
|
||
| file(STRINGS xxhash.h XXHASH_H REGEX "^#define XXH_VERSION_[A-Z]+[ ]+[0-9]+$") | ||
| string(REGEX REPLACE ".+XXH_VERSION_MAJOR[ ]+([0-9]+).*$" "\\1" xxHash_VERSION_MAJOR "${XXHASH_H}") | ||
| string(REGEX REPLACE ".+XXH_VERSION_MINOR[ ]+([0-9]+).*$" "\\1" xxHash_VERSION_MINOR "${XXHASH_H}") | ||
| string(REGEX REPLACE ".+XXH_VERSION_RELEASE[ ]+([0-9]+).*$" "\\1" xxHash_VERSION_PATCH "${XXHASH_H}") | ||
| set(xxHash_VERSION_STRING "${xxHash_VERSION_MAJOR}.${xxHash_VERSION_MINOR}.${xxHash_VERSION_PATCH}") | ||
|
|
||
| set(xxHash_VERSION ${xxHash_VERSION_STRING} CACHE INTERNAL "") | ||
| set(xxHash_VERSION_STRING ${xxHash_VERSION_STRING} CACHE INTERNAL "") | ||
|
|
||
| set(xxHash_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") | ||
| set(xxHash_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "") | ||
| mark_as_advanced(xxHash_INCLUDE_DIR) | ||
|
|
||
| add_library(xxhash STATIC xxhash.h xxhash.c) | ||
| set_target_properties(xxhash PROPERTIES C_VISIBILITY_PRESET hidden POSITION_INDEPENDENT_CODE ON) | ||
| target_include_directories(xxhash INTERFACE $<BUILD_INTERFACE:${xxHash_INCLUDE_DIR}>) | ||
|
|
||
| add_library(xxHash::xxHash ALIAS xxhash) | ||
|
|
||
| set(xxHash_LIBRARY $<TARGET_FILE:xxhash> CACHE INTERNAL "") | ||
| set(xxHash_LIBRARIES xxHash::xxHash CACHE INTERNAL "") | ||
|
|
||
| set_property(GLOBAL APPEND PROPERTY ROOT_BUILTIN_TARGETS xxHash::xxHash) | ||
ferdymercury marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # **PLEASE UPDATE ALSO THE FOLLOWING LINE WHEN UPDATING THE VERSION** | ||
| # 30 Dec 2024, https://github.com/Cyan4973/xxHash/releases/tag/v0.8.3 | ||
| set(ROOT_XXHASH_VERSION 0.8.3) | ||
| set(ROOT_XXHASH_HASH "aae608dfe8213dfd05d909a57718ef82f30722c392344583d3f39050c7f29a80") | ||
| # The sources come w/o CMakeList.txt as of version 0.8.3. We add ours, it's very simple. | ||
| set(ROOT_XXHASH_PATCH_FILE ${CMAKE_CURRENT_SOURCE_DIR}/xxhash_add_cmakelists.patch) | ||
|
|
||
| set(ROOT_XXHASH_PREFIX ${CMAKE_BINARY_DIR}/builtins/XXHASH-prefix) | ||
|
|
||
| set(ROOT_XXHASH_LIBRARY ${ROOT_XXHASH_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}xxhash${CMAKE_STATIC_LIBRARY_SUFFIX} | ||
| ) | ||
|
|
||
| if(WIN32 AND NOT CMAKE_GENERATOR MATCHES Ninja) | ||
| if(winrtdebug) | ||
| set(ROOT_XXHASH_BUILD_COMMAND_FLAGS "--config Debug") | ||
| else() | ||
| set(ROOT_XXHASH_BUILD_COMMAND_FLAGS "--config $<IF:$<CONFIG:Debug,RelWithDebInfo>,RelWithDebInfo,Release>") | ||
| endif() | ||
| endif() | ||
|
|
||
| ExternalProject_Add( | ||
| BUILTIN_XXHASH | ||
| PREFIX ${ROOT_XXHASH_PREFIX} | ||
| URL ${lcgpackages}/xxHash-${ROOT_XXHASH_VERSION}.tar.gz | ||
| URL_HASH SHA256=${ROOT_XXHASH_HASH} | ||
| PATCH_COMMAND git apply ${ROOT_XXHASH_PATCH_FILE} | ||
| CMAKE_ARGS -G ${CMAKE_GENERATOR} | ||
| -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} | ||
| -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
| -DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
| -DCMAKE_C_VISIBILITY_PRESET=hidden | ||
| BUILD_COMMAND ${CMAKE_COMMAND} --build . ${ROOT_XXHASH_BUILD_COMMAND_FLAGS} | ||
| INSTALL_COMMAND ${CMAKE_COMMAND} --build . ${ROOT_XXHASH_BUILD_COMMAND_FLAGS} --target install | ||
| LOG_CONFIGURE 1 | ||
| LOG_BUILD 1 | ||
| LOG_INSTALL 1 | ||
| LOG_OUTPUT_ON_FAILURE 1 | ||
| BUILD_BYPRODUCTS ${ROOT_XXHASH_LIBRARY} | ||
| TIMEOUT 600) | ||
|
|
||
| file(MAKE_DIRECTORY ${ROOT_XXHASH_PREFIX}/include) | ||
| add_library(xxHash::xxHash IMPORTED STATIC GLOBAL) | ||
ferdymercury marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| add_dependencies(xxHash::xxHash BUILTIN_XXHASH) | ||
| set_target_properties(xxHash::xxHash PROPERTIES | ||
| IMPORTED_LOCATION ${ROOT_XXHASH_LIBRARY} | ||
| INTERFACE_INCLUDE_DIRECTORIES ${ROOT_XXHASH_PREFIX}/include) | ||
|
|
||
| # Set the canonical output of find_package according to | ||
| # https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#standard-variable-names | ||
| set(xxHash_INCLUDE_DIRS ${ROOT_XXHASH_PREFIX}/include PARENT_SCOPE) | ||
| set(xxHash_LIBRARIES ${ROOT_XXHASH_LIBRARY} PARENT_SCOPE) | ||
| set(xxHash_FOUND TRUE PARENT_SCOPE) | ||
| set(xxHash_VERSION ${ROOT_XXHASH_VERSION} PARENT_SCOPE) | ||
| set_property(GLOBAL APPEND PROPERTY ROOT_BUILTIN_TARGETS BUILTIN_XXHASH) | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.