From 614d6b5714681c556337874a9d80f956ff5a39b6 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 24 Sep 2019 19:43:13 +0000 Subject: [PATCH 1/2] easylogging++: split strings manually Avoids cmake skullduggery --- external/easylogging++/easylogging++.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc index a5a4a64b7..b89fd3daf 100644 --- a/external/easylogging++/easylogging++.cc +++ b/external/easylogging++/easylogging++.cc @@ -18,7 +18,6 @@ #include "easylogging++.h" #include -#include #if defined(AUTO_INITIALIZE_EASYLOGGINGPP) INITIALIZE_EASYLOGGINGPP @@ -2438,7 +2437,19 @@ void DefaultLogDispatchCallback::handle(const LogDispatchData* data) { if (strchr(msg.c_str(), '\n')) { std::vector v; - boost::split(v, msg, boost::is_any_of("\n")); + const char *s = msg.c_str(); + while (true) + { + const char *ptr = strchr(s, '\n'); + if (!ptr) + { + if (*s) + v.push_back(s); + break; + } + v.push_back(std::string(s, ptr - s)); + s = ptr + 1; + } for (const std::string &s: v) { LogMessage msgline(logmsg->level(), logmsg->color(), logmsg->file(), logmsg->line(), logmsg->func(), logmsg->verboseLevel(), logmsg->logger(), &s); From 31bf2e25c5f96c02918cb3f750e061152b25e868 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 24 Sep 2019 20:09:17 +0000 Subject: [PATCH 2/2] Revert "easylogging++: ensure it finds boost headers" This reverts commit 9a95827ea72574c3e861aa3167c0b96b9bae64b3. --- CMakeLists.txt | 3 +-- external/easylogging++/CMakeLists.txt | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 241e2b4df..6b4cc80d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -451,6 +451,7 @@ ExternalProject_Add(generate_translations_header CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH} INSTALL_COMMAND cmake -E echo "") include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations") +add_subdirectory(external) # Final setup for libunbound include_directories(${UNBOUND_INCLUDE}) @@ -1023,5 +1024,3 @@ if (iwyu_tool_path AND PYTHONINTERP_FOUND) VERBATIM ) endif() - -add_subdirectory(external) diff --git a/external/easylogging++/CMakeLists.txt b/external/easylogging++/CMakeLists.txt index b9b9aea91..35fb86552 100644 --- a/external/easylogging++/CMakeLists.txt +++ b/external/easylogging++/CMakeLists.txt @@ -40,7 +40,6 @@ add_library(easylogging include_directories("${CMAKE_CURRENT_SOURCE_DIR}") include_directories("${CMAKE_CURRENT_BINARY_DIR}") -include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) target_link_libraries(easylogging PRIVATE ${CMAKE_THREAD_LIBS_INIT}