Skip to content

Commit cec7b69

Browse files
committed
Try again
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 1da6967 commit cec7b69

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "third-party/sentencepiece"]
22
path = third-party/sentencepiece
33
url = https://github.com/google/sentencepiece.git
4-
[submodule "third-party/googletest"]
5-
path = third-party/googletest
6-
url = https://github.com/google/googletest.git

CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,19 @@ target_link_libraries(tokenizers PUBLIC sentencepiece-static)
3838

3939
# Build test
4040
if(TOKENIZERS_BUILD_TEST)
41-
add_subdirectory(third-party/googletest)
42-
find_package(GTest CONFIG REQUIRED)
43-
set(GTEST_INCLUDE_PATH
44-
third-party/googletest/googletest/include)
41+
include(FetchContent)
42+
FetchContent_Declare(
43+
googletest
44+
# Specify the commit you depend on and update it regularly.
45+
URL https://github.com/google/googletest/archive/5376968f6948923e2411081fd9372e71a59d8e77.zip
46+
)
47+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
48+
FetchContent_MakeAvailable(googletest)
49+
4550
set(ENV{RESOURCES_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/test/resources)
4651
add_executable(sentencepiece_test test/test_sentencepiece.cpp)
4752
target_include_directories(
4853
sentencepiece_test PUBLIC third-party/sentencepiece/src
4954
third-party/sentencepiece include GTEST_INCLUDE_PATH)
50-
target_link_libraries(sentencepiece_test PUBLIC tokenizers GTest::GTest
51-
GTest::Main)
55+
target_link_libraries(sentencepiece_test PUBLIC tokenizers gtest_main)
5256
endif()

third-party/googletest

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)