diff options
author | Kentaro Hayashi <hayashi@clear-code.com> | 2020-10-17 10:54:20 +0300 |
---|---|---|
committer | Kentaro Hayashi <hayashi@clear-code.com> | 2020-10-17 10:55:44 +0300 |
commit | 130023a1fafe959c079155ab82ad769c12d3326d (patch) | |
tree | 094e720492cf066a58fb2355f7c5c16fa77675bc | |
parent | 496f22507529d6c4e2935a5967fd4fb4e53ebd47 (diff) |
Fix FTBFS on armel, mips, powerpc, m68k and sh4
-rw-r--r-- | src/CMakeLists.txt | 7 |
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) |