From 743f762a5f181939cf106d49b77e13c9eeef2d5a Mon Sep 17 00:00:00 2001 From: Qijia Liu Date: Fri, 6 Oct 2023 17:07:17 -0400 Subject: [PATCH] drop boost/signals --- CMakeLists.txt | 7 ------- README.md | 5 +++-- src/rime/build_config.h.in | 1 - src/rime/common.h | 9 --------- 4 files changed, 3 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aecf5a08e..af87ccf6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,6 @@ option(BUILD_SAMPLE "Build sample Rime plugin" OFF) option(BUILD_TEST "Build and run tests" ON) option(BUILD_SEPARATE_LIBS "Build separate rime-* libraries" OFF) option(ENABLE_LOGGING "Enable logging with google-glog library" ON) -option(BOOST_USE_SIGNALS2 "Boost use signals2 instead of signals" ON) option(ENABLE_ASAN "Enable Address Sanitizer (Unix Only)" OFF) option(INSTALL_PRIVATE_HEADERS "Install private headers (usually needed for externally built Rime plugins)" OFF) option(ENABLE_EXTERNAL_PLUGINS "Enable loading of externally built Rime plugins (from directory set by RIME_PLUGINS_DIR variable)" OFF) @@ -61,12 +60,6 @@ endif() set(BOOST_COMPONENTS regex) -if(BOOST_USE_SIGNALS2) - set(RIME_BOOST_SIGNALS2 1) -else() - set(BOOST_COMPONENTS ${BOOST_COMPONENTS} signals) -endif() - find_package(Boost 1.74.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS}) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) diff --git a/README.md b/README.md index 90974cad6..508cc1b09 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,8 @@ Follow the instructions to build librime on platforms other than Linux: Build dependencies --- - - compiler with C++14 support - - cmake>=3.10 + - compiler with C++17 support + - cmake>=3.12 - libboost>=1.74 - libglog (optional) - libleveldb @@ -81,6 +81,7 @@ Community: - [Trime](https://github.com/osfans/trime): frontend for Android - [XIME](https://github.com/stackia/XIME): frontend for macOS - [My RIME](https://github.com/LibreService/my_rime): frontend for web + - [fcitx5-android](https://github.com/fcitx5-android/fcitx5-android): frontend for Android Plugins === diff --git a/src/rime/build_config.h.in b/src/rime/build_config.h.in index 760059086..2395cc9ad 100644 --- a/src/rime/build_config.h.in +++ b/src/rime/build_config.h.in @@ -5,7 +5,6 @@ #ifndef RIME_BUILD_CONFIG_H_ #define RIME_BUILD_CONFIG_H_ -#cmakedefine RIME_BOOST_SIGNALS2 #cmakedefine RIME_ENABLE_LOGGING #cmakedefine RIME_DATA_DIR "@RIME_DATA_DIR@" diff --git a/src/rime/common.h b/src/rime/common.h index a658ef12d..ad84b152c 100644 --- a/src/rime/common.h +++ b/src/rime/common.h @@ -22,12 +22,8 @@ #include #include #define BOOST_BIND_NO_PLACEHOLDERS -#ifdef RIME_BOOST_SIGNALS2 #include #include -#else -#include -#endif #ifdef RIME_ENABLE_LOGGING #define GLOG_NO_ABBREVIATED_SEVERITIES @@ -83,13 +79,8 @@ inline an New(Args&&... args) { return std::make_shared(std::forward(args)...); } -#ifdef RIME_BOOST_SIGNALS2 using boost::signals2::connection; using boost::signals2::signal; -#else -using boost::signal; -using boost::signals::connection; -#endif } // namespace rime