Fix CRAN check by removing reference to std::cerr (#3660)

* Fix CRAN check by removing reference to std::cerr

* Mask tests that fail on 32-bit Windows R
This commit is contained in:
Philip Hyunsu Cho
2018-09-05 11:44:00 -07:00
committed by Philip Cho
parent 4bc7e94603
commit a46b0ac2d2
4 changed files with 26 additions and 6 deletions

View File

@@ -38,6 +38,8 @@ class TrackerLogger : public BaseLogger {
~TrackerLogger();
};
// custom logging callback; disabled for R wrapper
#if !defined(XGBOOST_STRICT_R_MODE) || XGBOOST_STRICT_R_MODE == 0
class LogCallbackRegistry {
public:
using Callback = void (*)(const char*);
@@ -52,6 +54,17 @@ class LogCallbackRegistry {
private:
Callback log_callback_;
};
#else
class LogCallbackRegistry {
public:
using Callback = void (*)(const char*);
LogCallbackRegistry() {}
inline void Register(Callback log_callback) {}
inline Callback Get() const {
return nullptr;
}
};
#endif
using LogCallbackRegistryStore = dmlc::ThreadLocalStore<LogCallbackRegistry>;