Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:shanipribadi
apache-arrow
apache-arrow-pr40230-glog-0.7.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File apache-arrow-pr40230-glog-0.7.patch of Package apache-arrow
From 147504673e409fc5267f0422a58f170f442b5455 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" <uwe.korn@quantco.com> Date: Mon, 26 Feb 2024 09:21:31 +0100 Subject: [PATCH] GH-40181: [C++] Support glog 0.7 build --- cpp/cmake_modules/FindGLOG.cmake | 8 +++++++- cpp/src/arrow/util/logging.cc | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cpp/cmake_modules/FindGLOG.cmake b/cpp/cmake_modules/FindGLOG.cmake index 61b7d0694efd4..62b235ee917ca 100644 --- a/cpp/cmake_modules/FindGLOG.cmake +++ b/cpp/cmake_modules/FindGLOG.cmake @@ -17,6 +17,11 @@ # # find_package(GLOG) +find_package(glog CONFIG) +if(glog_FOUND) + return() +endif() + if(GLOG_FOUND) return() endif() @@ -56,5 +61,6 @@ if(GLOG_FOUND) add_library(glog::glog UNKNOWN IMPORTED) set_target_properties(glog::glog PROPERTIES IMPORTED_LOCATION "${GLOG_LIB}" - INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIR}") + INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIR}" + INTERFACE_COMPILE_DEFINITIONS "GLOG_USE_GLOG_EXPORT") endif() diff --git a/cpp/src/arrow/util/logging.cc b/cpp/src/arrow/util/logging.cc index d2931132372a7..25c336a6d2111 100644 --- a/cpp/src/arrow/util/logging.cc +++ b/cpp/src/arrow/util/logging.cc @@ -116,7 +116,7 @@ static std::unique_ptr<std::string> log_dir_; #ifdef ARROW_USE_GLOG // Glog's severity map. -static int GetMappedSeverity(ArrowLogLevel severity) { +static google::LogSeverity GetMappedSeverity(ArrowLogLevel severity) { switch (severity) { case ArrowLogLevel::ARROW_DEBUG: return google::GLOG_INFO; @@ -148,7 +148,7 @@ void ArrowLog::StartArrowLog(const std::string& app_name, app_name_.reset(new std::string(app_name)); log_dir_.reset(new std::string(log_dir)); #ifdef ARROW_USE_GLOG - int mapped_severity_threshold = GetMappedSeverity(severity_threshold_); + google::LogSeverity mapped_severity_threshold = GetMappedSeverity(severity_threshold_); google::SetStderrLogging(mapped_severity_threshold); // Enable log file if log_dir is not empty. if (!log_dir.empty()) { @@ -173,7 +173,7 @@ void ArrowLog::StartArrowLog(const std::string& app_name, google::SetLogFilenameExtension(app_name_without_path.c_str()); for (int i = static_cast<int>(severity_threshold_); i <= static_cast<int>(ArrowLogLevel::ARROW_FATAL); ++i) { - int level = GetMappedSeverity(static_cast<ArrowLogLevel>(i)); + google::LogSeverity level = GetMappedSeverity(static_cast<ArrowLogLevel>(i)); google::SetLogDestination(level, dir_ends_with_slash.c_str()); } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor