File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
[submodule "third-party/sentencepiece "]
2
2
path = third-party/sentencepiece
3
3
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
Original file line number Diff line number Diff line change @@ -38,15 +38,19 @@ target_link_libraries(tokenizers PUBLIC sentencepiece-static)
38
38
39
39
# Build test
40
40
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
+
45
50
set (ENV{RESOURCES_PATH} ${CMAKE_CURRENT_SOURCE_DIR} /test/resources )
46
51
add_executable (sentencepiece_test test /test_sentencepiece.cpp )
47
52
target_include_directories (
48
53
sentencepiece_test PUBLIC third-party/sentencepiece/src
49
54
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 )
52
56
endif ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments