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:
authorTaku Kudo <taku910@users.noreply.github.com>2020-10-21 12:55:57 +0300
committerGitHub <noreply@github.com>2020-10-21 12:55:57 +0300
commitafe38cba46559c4598ef15c525c6b05b3855d689 (patch)
treeec90b7c11568a5e6b64486073a648518e9a2b947
parent8c0104b47ddea53f2e2187ebe39a0ec4c6943f04 (diff)
parent130023a1fafe959c079155ab82ad769c12d3326d (diff)
Merge pull request #563 from kenhys/fix-ftbfs-ports
cmake: fix FTBFS on armel, mips, powerpc, m68k and sh4
-rw-r--r--src/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 07316a1..c11ad56 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -195,6 +195,13 @@ target_link_libraries(sentencepiece_train-static INTERFACE sentencepiece-static
if (SPM_ENABLE_SHARED)
target_link_libraries(sentencepiece ${SPM_LIBS})
target_link_libraries(sentencepiece_train ${SPM_LIBS} sentencepiece)
+ if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l") OR
+ (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips") OR
+ (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "m68k") OR
+ (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "ppc") OR
+ (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "sh4"))
+ list(APPEND SPM_LIBS "atomic")
+ endif()
set(SPM_INSTALLTARGETS sentencepiece sentencepiece_train sentencepiece-static sentencepiece_train-static)
set_target_properties(sentencepiece sentencepiece_train PROPERTIES SOVERSION 0 VERSION 0.0.0)
set_target_properties(sentencepiece PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES)