File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717#
1818# find_package(GLOG)
1919
20+ find_package (glog CONFIG )
21+ if (glog_FOUND)
22+ return ()
23+ endif ()
24+
2025if (GLOG_FOUND)
2126 return ()
2227endif ()
@@ -56,5 +61,6 @@ if(GLOG_FOUND)
5661 add_library (glog::glog UNKNOWN IMPORTED )
5762 set_target_properties (glog::glog
5863 PROPERTIES IMPORTED_LOCATION "${GLOG_LIB} "
59- INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIR} " )
64+ INTERFACE_INCLUDE_DIRECTORIES "${GLOG_INCLUDE_DIR} "
65+ INTERFACE_COMPILE_DEFINITIONS "GLOG_USE_GLOG_EXPORT" )
6066endif ()
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ static std::unique_ptr<std::string> log_dir_;
116116#ifdef ARROW_USE_GLOG
117117
118118// Glog's severity map.
119- static int GetMappedSeverity (ArrowLogLevel severity) {
119+ static google::LogSeverity GetMappedSeverity (ArrowLogLevel severity) {
120120 switch (severity) {
121121 case ArrowLogLevel::ARROW_DEBUG:
122122 return google::GLOG_INFO;
@@ -148,7 +148,7 @@ void ArrowLog::StartArrowLog(const std::string& app_name,
148148 app_name_.reset (new std::string (app_name));
149149 log_dir_.reset (new std::string (log_dir));
150150#ifdef ARROW_USE_GLOG
151- int mapped_severity_threshold = GetMappedSeverity (severity_threshold_);
151+ google::LogSeverity mapped_severity_threshold = GetMappedSeverity (severity_threshold_);
152152 google::SetStderrLogging (mapped_severity_threshold);
153153 // Enable log file if log_dir is not empty.
154154 if (!log_dir.empty ()) {
@@ -173,7 +173,7 @@ void ArrowLog::StartArrowLog(const std::string& app_name,
173173 google::SetLogFilenameExtension (app_name_without_path.c_str ());
174174 for (int i = static_cast <int >(severity_threshold_);
175175 i <= static_cast <int >(ArrowLogLevel::ARROW_FATAL); ++i) {
176- int level = GetMappedSeverity (static_cast <ArrowLogLevel>(i));
176+ google::LogSeverity level = GetMappedSeverity (static_cast <ArrowLogLevel>(i));
177177 google::SetLogDestination (level, dir_ends_with_slash.c_str ());
178178 }
179179 }
You can’t perform that action at this time.
0 commit comments