diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dfc8ddf..5feb19e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -139,7 +139,6 @@ jobs: matrix: include: [ { name: 'ARM64', xcc_pkg: gcc-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc, xemu_pkg: qemu-system-arm, xemu: qemu-aarch64-static, os: ubuntu-latest, }, - { name: 'ARM64, gcc-9', xcc_pkg: gcc-9-aarch64-linux-gnu, xcc: aarch64-linux-gnu-gcc-9, xemu_pkg: qemu-system-arm, xemu: qemu-aarch64-static, os: ubuntu-20.04, }, ] env: # Set environment variables diff --git a/build-and-run-no-jieba b/build-and-run-no-jieba index 424b8ec..62f84e4 100755 --- a/build-and-run-no-jieba +++ b/build-and-run-no-jieba @@ -77,7 +77,7 @@ simple.example() { run "./sqlite3 < ${ProjectRoot}/example.sql" run "./simple_cpp_example" run "cd ${ProjectRoot}" - run "python3 examples/python3/db_connector.py" + run "python3 examples/python3/db_connector.py './output/bin/libsimple'" } main() { diff --git a/examples/cpp/main.cc b/examples/cpp/main.cc index 06d2905..2bdf692 100644 --- a/examples/cpp/main.cc +++ b/examples/cpp/main.cc @@ -73,12 +73,6 @@ int main() { handle_rc(db, rc); ms pinyin = Clock::now() - before; std::cout << "It took " << pinyin.count() << "ms to init pinyin" << std::endl; - before = Clock::now(); - sql = "select jieba_query('结巴')"; - rc = sqlite3_exec(db, sql.c_str(), callback, 0, &zErrMsg); - handle_rc(db, rc); - ms warm_up = Clock::now() - before; - std::cout << "It took " << warm_up.count() << "ms to init jieba" << std::endl; before = Clock::now(); // create fts table @@ -112,6 +106,13 @@ int main() { rc = sqlite3_exec(db, sql.c_str(), callback, 0, &zErrMsg); handle_rc(db, rc); #ifdef USE_JIEBA + before = Clock::now(); + sql = "select jieba_query('结巴')"; + rc = sqlite3_exec(db, sql.c_str(), callback, 0, &zErrMsg); + handle_rc(db, rc); + ms warm_up = Clock::now() - before; + std::cout << "It took " << warm_up.count() << "ms to init jieba" << std::endl; + // set dict path manually string dict_path = get_current_dir() + "/dict"; sql = "select jieba_dict('" + dict_path + "')"; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6d7474b..468f77d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,9 +6,9 @@ if(SIMPLE_WITH_JIEBA) ExternalProject_Add( cppjieba PREFIX ${CMAKE_BINARY_DIR}/cppjieba - GIT_REPOSITORY https://github.com/yanyiwu/cppjieba.git + GIT_REPOSITORY https://github.com/wangfenjin/cppjieba.git CONFIGURE_COMMAND "" - GIT_TAG 194c144d8b5ed1baf3190d07c5226e804454ab47 + GIT_TAG master BUILD_COMMAND cmake -E echo "Skipping build cppjieba." INSTALL_COMMAND cmake -E echo "Skipping install cppjieba." LOG_DOWNLOAD ON @@ -38,6 +38,8 @@ if(SIMPLE_WITH_JIEBA) add_dependencies(simple cppjieba) include_directories(${SQLITE3_HEADERS_DIR} ${source_dir}/include ${source_dir}/deps) target_include_directories(simple INTERFACE ${SQLITE3_HEADERS_DIR} ${source_dir}/include ${source_dir}/deps) + set_source_files_properties(${source_dir}/deps/limonp/Md5.cpp PROPERTIES GENERATED TRUE) + target_sources(simple PRIVATE ${source_dir}/deps/limonp/Md5.cpp) # for tests only add_custom_command(TARGET simple PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory