Skip to content

Fix cmake for regex lookahead #80

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

Merged
merged 2 commits into from
Jun 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ if(SUPPORT_REGEX_LOOKAHEAD OR TOKENIZERS_BUILD_TEST)
target_include_directories(
regex_lookahead PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/third-party/pcre2/src)
target_link_options_shared_lib(regex_lookahead)
target_link_options_shared_lib(regex_lookahead)
target_link_libraries(tokenizers PUBLIC regex_lookahead)
endif()

# Build test
Expand Down Expand Up @@ -117,8 +118,7 @@ if(TOKENIZERS_BUILD_TEST)
${CMAKE_CURRENT_SOURCE_DIR}/third-party/sentencepiece
${CMAKE_CURRENT_SOURCE_DIR}/third-party/re2
${CMAKE_CURRENT_SOURCE_DIR}/third-party/json/single_include)
target_link_libraries(${test_name} gtest_main GTest::gmock tokenizers
regex_lookahead)
target_link_libraries(${test_name} gtest_main GTest::gmock tokenizers)
add_test(${test_name} "${test_name}")
set_tests_properties(${test_name} PROPERTIES ENVIRONMENT ${test_env})
endforeach()
Expand Down