-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update librime and glog; add librime-predict (#24)
Co-authored-by: Rocka <i@rocka.me>
- Loading branch information
1 parent
1b4b3db
commit 1ea929e
Showing
11 changed files
with
83 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule glog
updated
92 files
Submodule librime-lua
updated
14 files
+81 −0 | sample/lua/script_translator.lua | |
+84 −0 | sample/lua/table_translator.lua | |
+6 −0 | sample/luna_pinyin.custom.yaml | |
+4 −0 | src/lib/lua.cc | |
+2 −0 | src/lib/lua.h | |
+4 −0 | src/lua_gears.cc | |
+2 −0 | src/lua_gears.h | |
+31 −2 | src/modules.cc | |
+118 −42 | src/opencc.cc | |
+178 −0 | src/script_translator.cc | |
+223 −0 | src/table_translator.cc | |
+69 −0 | src/translator.h | |
+134 −48 | src/types.cc | |
+29 −7 | src/types_ext.cc |
Submodule librime-octagram
updated
4 files
+5 −5 | src/gram_db.cc | |
+2 −2 | src/gram_db.h | |
+1 −1 | src/octagram.cc | |
+4 −4 | tools/build_grammar.cc |
Submodule librime-predict
added at
72e4d7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index b787631..1fc8cf4 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -402,6 +402,7 @@ add_custom_command ( | ||
COMMAND ${CMAKE_COMMAND} -E touch ${_glog_EMPTY_SOURCE} | ||
) | ||
|
||
+target_compile_options(glog_internal PRIVATE "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.") | ||
add_library (glog | ||
$<TARGET_OBJECTS:glog_internal> | ||
${_glog_EMPTY_SOURCE} | ||
diff --git a/src/glog/platform.h b/src/glog/platform.h | ||
index 4aaf5b0..f118ca8 100644 | ||
--- a/src/glog/platform.h | ||
+++ b/src/glog/platform.h | ||
@@ -42,6 +42,9 @@ | ||
# ifndef GLOG_OS_LINUX | ||
# define GLOG_OS_LINUX | ||
# endif | ||
+# if defined(__ANDROID__) | ||
+# define GLOG_OS_ANDROID | ||
+# endif | ||
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) | ||
# define GLOG_OS_MACOSX | ||
#elif defined(__FreeBSD__) | ||
@@ -52,9 +55,6 @@ | ||
# define GLOG_OS_OPENBSD | ||
#elif defined(__EMSCRIPTEN__) | ||
# define GLOG_OS_EMSCRIPTEN | ||
-#elif defined(__ANDROID__) | ||
-# define GLOG_OS_ANDROID | ||
-#else | ||
// TODO(hamaji): Add other platforms. | ||
#error Platform not supported by glog. Please consider to contribute platform information by submitting a pull request on Github. | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 07703bf..5ab6d3b 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.10) | ||
aux_source_directory(src predict_src) | ||
|
||
add_library(rime-predict-objs OBJECT ${predict_src}) | ||
+target_compile_options(rime-predict-objs PRIVATE "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.") | ||
if(BUILD_SHARED_LIBS) | ||
set_target_properties(rime-predict-objs | ||
PROPERTIES | ||
@@ -15,4 +16,4 @@ set(plugin_objs $<TARGET_OBJECTS:rime-predict-objs> PARENT_SCOPE) | ||
set(plugin_deps ${rime_library} PARENT_SCOPE) | ||
set(plugin_modules "predict" PARENT_SCOPE) | ||
|
||
-add_subdirectory(tools) | ||
+# add_subdirectory(tools) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters