Merged
Conversation
jackzhxng
reviewed
Jun 10, 2025
Contributor
jackzhxng
left a comment
There was a problem hiding this comment.
Excited to use ExternalProject_Add, I assume you will be refactoring ET to use this as a follow up?
|
|
||
| install( | ||
| DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/third-party/json/single_include/ | ||
| DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} |
Contributor
There was a problem hiding this comment.
Won't this single include also be found in ${CMAKE_CURRENT_SOURCE_DIR}/include/? Then you can update the pattern to also accept *.hpp?
Contributor
Author
There was a problem hiding this comment.
It's not in ${CMAKE_CURRENT_SOURCE_DIR}/include/
GregoryComer
approved these changes
Jun 12, 2025
Allowing parent repo to be able to cmake --target install and then find_package(tokenizers CONFIG) This comes in handy when we want to build tokenizers as an external project or rely on FetchContent.
a2bac3b to
9aea7ff
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces several enhancements to the
CMakeLists.txtfile and adds a new configuration file for thetokenizerspackage. The changes focus on improving build system support, adding installation rules, and providing a package configuration file for easier integration with other projects.Build system improvements:
CMakeLists.txt: IncludedCMakePackageConfigHelpersto enable the use ofconfigure_package_config_filefor generating CMake configuration files.CMakeLists.txt: Updatedtarget_include_directoriesto use$<BUILD_INTERFACE>for better handling of include directories during the build process.Installation rules:
CMakeLists.txt: Added installation rules for the library, headers, and CMake configuration files, includingtokenizers-targets.cmakeandtokenizers-config.cmake. These rules ensure the library and its dependencies are correctly installed.Package configuration:
cmake/tokenizers-config.cmake.in: Added a new configuration file for thetokenizerspackage, defining variables such asTOKENIZERS_FOUND,TOKENIZERS_INCLUDE_DIRS, andTOKENIZERS_LIBRARIES. It includes dependency checks and ensures thesentencepiecelibrary is available.For any CMake project we should be able to do the following: