Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/sentencepiece.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohit Jain <rjai@microsoft.com>2021-05-23 20:46:17 +0300
committerRohit Jain <rjai@microsoft.com>2021-05-23 20:46:17 +0300
commita07399044a66fb769c1f47be5a0c63f9090d64f9 (patch)
tree44af34a202e6bf6f634ea2f7cf064d190a50d9e9
parent8336bbd0c1cfba02a879afe625bf1ddaf7cd93c5 (diff)
Adding alternative project name for spm latest to prevent lib conflicts
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3a8b99..d3d41f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,13 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
file(STRINGS "VERSION" SPM_VERSION)
message(STATUS "VERSION: ${SPM_VERSION}")
+option(SPM_ALT_PROJNAME "Call sentencepiece sentencepiecelatest to avoid conflicts" OFF)
+
+if (SPM_ALT_PROJNAME)
+project(sentencepiecelatest VERSION ${SPM_VERSION} LANGUAGES C CXX)
+else()
project(sentencepiece VERSION ${SPM_VERSION} LANGUAGES C CXX)
+endif()
option(SPM_ENABLE_NFKC_COMPILE "Enables NFKC compile" OFF)
option(SPM_ENABLE_SHARED "Builds shared libaries in addition to static libraries." ON)
@@ -98,6 +104,14 @@ endif()
add_subdirectory(src)
add_subdirectory(third_party)
+if (SPM_ALT_PROJNAME)
+set_target_properties(sentencepiece PROPERTIES OUTPUT_NAME "sentencepiecelatest")
+set_target_properties(sentencepiece_train PROPERTIES OUTPUT_NAME "sentencepiece_train_latest")
+set_target_properties(sentencepiece-static PROPERTIES OUTPUT_NAME "sentencepiecelatest")
+set_target_properties(sentencepiece_train-static PROPERTIES OUTPUT_NAME "sentencepiece_train_latest")
+else()
+endif()
+
set(CPACK_SOURCE_GENERATOR "TXZ")
set(CPACK_GENERATOR "7Z")
set(CPACK_PACKAGE_VERSION "${SPM_VERSION}")