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

Isolate binary and Boost-dependent build components #418

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jacobkahn
Copy link
Contributor

Adds the BUILD_TOOLS (and BUILD_BENCHMARKS) options to the CMake build, which allows users to easily toggle building or not building binary-related components (that are also Boost-dependent). Getting a build of KenLM that doesn't depend on Boost (and thus doesn't build any binary components such as builder or interpolate) is now as simple as

cmake .. -DBUILD_TOOLS=OFF

Also adds BUILD_BENCHMARKS, which modulates building benchmarks.

All defaults are set such that there is no behavior change from the current build if these options aren't specified.

@kpu
Copy link
Owner

kpu commented Feb 22, 2023

This is nice. Though the build_binary and query programs come Boost free, so BUILD_TOOLS is perhaps the wrong name. Query only (there is compile_query_only.sh) or something about Boost?

@jacobkahn
Copy link
Contributor Author

Renamed to BUILD_WITH_BOOST and re-enabled building query, fragment, and build_binary since they aren't boost dependent, as you say 👍 . I've tested in a few limited environments, but it would be good to test in other places.

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.

2 participants