Skip to content

Conversation

@niklas-uhl
Copy link
Collaborator

@niklas-uhl niklas-uhl commented Nov 6, 2025

xxhash sets BUILD_SHARED_LIBS which forces all libraries to be
build as SHARED.

Previously, we fixed this by calling
set(BUILD_SHARED_LIBS OFF) before including xxhash, but this cannot
be overwritten by the user. This prevents user from building KaGen as
a shared library, as noticed in #74.

This change no handles that cleanly and gives full control to the user
by add option(BUILD_SHARED_LIBS ...) at the top of KaGen's
CMakeList.txt, as suggested in 1.

xxhash sets `BUILD_SHARED_LIBS` which forces all libraries to be
build as `SHARED`.

Previously, we fixed this by calling
`set(BUILD_SHARED_LIBS OFF)` before including xxhash, but this cannot
be overwritten by the user. This prevents user from building KaGen as
a shared library, as noticed in #74.

This change no handles that cleanly and gives full control to the user
by add `option(BUILD_SHARED_LIBS ...)` at the top of KaGen's
CMakeList.txt, as suggested in [1].

[1]: https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html
@mschimek mschimek merged commit 7ed9109 into main Nov 6, 2025
4 checks passed
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