Skip to content

Commit fc32028

Browse files
authored
Fix cmake for regex lookahead (#80)
1 parent fc5962c commit fc32028

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ if(SUPPORT_REGEX_LOOKAHEAD OR TOKENIZERS_BUILD_TEST)
8585
target_include_directories(
8686
regex_lookahead PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
8787
${CMAKE_CURRENT_SOURCE_DIR}/third-party/pcre2/src)
88-
target_link_options_shared_lib(regex_lookahead)
88+
target_link_options_shared_lib(regex_lookahead)
89+
target_link_libraries(tokenizers PUBLIC regex_lookahead)
8990
endif()
9091

9192
# Build test
@@ -117,8 +118,7 @@ if(TOKENIZERS_BUILD_TEST)
117118
${CMAKE_CURRENT_SOURCE_DIR}/third-party/sentencepiece
118119
${CMAKE_CURRENT_SOURCE_DIR}/third-party/re2
119120
${CMAKE_CURRENT_SOURCE_DIR}/third-party/json/single_include)
120-
target_link_libraries(${test_name} gtest_main GTest::gmock tokenizers
121-
regex_lookahead)
121+
target_link_libraries(${test_name} gtest_main GTest::gmock tokenizers)
122122
add_test(${test_name} "${test_name}")
123123
set_tests_properties(${test_name} PROPERTIES ENVIRONMENT ${test_env})
124124
endforeach()

0 commit comments

Comments
 (0)