Skip to content

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.

@porcelijn
Copy link

Is this going to be merged? Flashlight-text seems to rely on this fix.

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