diff options
author | Marcin Junczys-Dowmunt <marcinjd@microsoft.com> | 2018-11-25 22:50:02 +0300 |
---|---|---|
committer | Marcin Junczys-Dowmunt <marcinjd@microsoft.com> | 2018-11-25 22:50:02 +0300 |
commit | f8969fbf3bf3b4d0f1db4961b23437090e57d816 (patch) | |
tree | 070f3af32dd77a1dda4f08dc4c194aa48ba55fd2 | |
parent | c98e59f924ee9a1444e8806b688c8f2ad2aaa025 (diff) |
change sentencepiece into submodule
-rwxr-xr-x | .gitignore | 2 | ||||
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | CMakeLists.txt | 11 | ||||
m--------- | examples | 0 | ||||
-rw-r--r-- | src/3rd_party/CMakeLists.txt | 2 | ||||
m--------- | src/3rd_party/sentencepiece | 0 |
6 files changed, 3 insertions, 15 deletions
@@ -62,5 +62,3 @@ examples/mnist/*ubyte .vs
.vscode
-# SentencePiece is automatically downloaded when requested -src/3rd_party/sentencepiece/ diff --git a/.gitmodules b/.gitmodules index 903659e7..623b7060 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "examples"] path = examples url = https://github.com/marian-nmt/marian-examples +[submodule "src/3rd_party/sentencepiece"] + path = src/3rd_party/sentencepiece + url = https://github.com/marian-nmt/sentencepiece diff --git a/CMakeLists.txt b/CMakeLists.txt index 49be7a73..d814e40a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,17 +51,6 @@ endif() # Downloading SentencePiece if requested and set to compile with it. # Requires all the dependencies imposed by SentencePiece if(USE_SENTENCEPIECE) - message(STATUS "Using SentencePiece from our fork https://github.com/marian-nmt/sentencepiece.git") - if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/3rd_party/sentencepiece) - execute_process(COMMAND git clone https://github.com/marian-nmt/sentencepiece.git - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/3rd_party - RESULT_VARIABLE git_result - ERROR_QUIET) - message(STATUS "Downloaded SentencePiece [code: ${git_result}]") - else() - message(STATUS "It seems that SentencePiece has already been downloaded. Reusing.") - endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_SENTENCEPIECE") LIST(APPEND CUDA_NVCC_FLAGS -DUSE_SENTENCEPIECE; ) set(EXT_LIBS ${EXT_LIBS} sentencepiece sentencepiece_train) diff --git a/examples b/examples -Subproject 8bf8e5d89e84a6ece037a7b7b7929d75470bf21 +Subproject 6ba258504fa2d5c08a9594271a8268c5890b31c diff --git a/src/3rd_party/CMakeLists.txt b/src/3rd_party/CMakeLists.txt index 22183164..71eb81aa 100644 --- a/src/3rd_party/CMakeLists.txt +++ b/src/3rd_party/CMakeLists.txt @@ -5,7 +5,6 @@ add_subdirectory(./yaml-cpp) add_subdirectory(./SQLiteCpp) if(USE_SENTENCEPIECE) - if(USE_STATIC_LIBS) set(_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) if(WIN32) @@ -29,7 +28,6 @@ if(USE_SENTENCEPIECE) if(USE_STATIC_LIBS) set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) endif() - endif(USE_SENTENCEPIECE) diff --git a/src/3rd_party/sentencepiece b/src/3rd_party/sentencepiece new file mode 160000 +Subproject 78deeaff9a3cdb0de1a59440401c736b7a839f8 |