Skip to content

Commit

Permalink
fix: ensure export macro to be defined (#1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud authored Jan 4, 2024
1 parent c8950c6 commit f3bee1b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/glog/flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
# include "glog/export.h"
#endif

#if !defined(GLOG_EXPORT)
# error <glog/flags.h> was not included correctly. See the documention for how to consume the library.
#endif

#include "glog/platform.h"
#include "glog/types.h"

Expand Down
4 changes: 4 additions & 0 deletions src/glog/log_severity.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
# include "glog/export.h"
#endif

#if !defined(GLOG_EXPORT)
# error <glog/log_severity.h> was not included correctly. See the documention for how to consume the library.
#endif

namespace google {

// The recommended semantics of the log levels are as follows:
Expand Down
4 changes: 4 additions & 0 deletions src/glog/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
# include "glog/export.h"
#endif

#if !defined(GLOG_EXPORT)
# error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
#endif

#include "glog/flags.h"
#include "glog/platform.h"
#include "glog/types.h"
Expand Down
10 changes: 7 additions & 3 deletions src/glog/raw_logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@
#ifndef GLOG_RAW_LOGGING_H
#define GLOG_RAW_LOGGING_H

#include "glog/log_severity.h"
#include "glog/vlog_is_on.h"

#if defined(GLOG_USE_GLOG_EXPORT)
# include "glog/export.h"
#endif

#if !defined(GLOG_EXPORT)
# error <glog/raw_logging.h> was not included correctly. See the documention for how to consume the library.
#endif

#include "glog/log_severity.h"
#include "glog/vlog_is_on.h"

namespace google {

// This is similar to LOG(severity) << format... and VLOG(level) << format..,
Expand Down
4 changes: 4 additions & 0 deletions src/glog/vlog_is_on.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
# include "glog/export.h"
#endif

#if !defined(GLOG_EXPORT)
# error <glog/vlog_is_on.h> was not included correctly. See the documention for how to consume the library.
#endif

#include "glog/flags.h"
#include "glog/types.h"

Expand Down

0 comments on commit f3bee1b

Please sign in to comment.