Skip to content
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

Support xxHash with external lz4 #4495

Merged
merged 1 commit into from
Feb 25, 2019
Merged

Conversation

orivej
Copy link
Contributor

@orivej orivej commented Feb 24, 2019

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Category (leave one):

  • Build/Testing/Packaging Improvement

Short description (up to few sentences):

xxhash.h does not exist in external lz4 because it is an implementation detail and its symbols are namespaced with XXH_NAMESPACE macro. When lz4 is external, xxHash has to be external too, and the dependents have to link to it.

The old find_xxhash.cmake was added in 7b42029.
The new find_xxhash.cmake is based on find_lz4.cmake.


I have tested that ClickHouse builds without contrib/lz4 both with and without system xxhash, and uses system xxhash if available.

@@ -20,8 +20,7 @@ target_link_libraries(clickhouse_functions
${METROHASH_LIBRARIES}
murmurhash
${BASE64_LIBRARY}
${OPENSSL_CRYPTO_LIBRARY}
${LZ4_LIBRARY})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LZ4_LIBRARY is not needed here due to USE_XXHASH added below. It came from https://github.com/yandex/ClickHouse/pull/3905/files#diff-6ad97c74dd7af3de638524e1b08e1093R25.

xxhash.h does not exist in external lz4 because it is an implementation detail
and its symbols are namespaced with XXH_NAMESPACE macro.  When lz4 is external,
xxHash has to be external too, and the dependents have to link to it.

This find_xxhash.cmake is based on find_lz4.cmake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants