From c38170461d4fe6ebab775839d4d746a398c3844e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 1 Jul 2017 10:09:25 -0700 Subject: [PATCH] Add an error on broken includes --- fmt/format.h | 2 ++ fmt/string.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/fmt/format.h b/fmt/format.h index 6ee9d2a2..88ab31a3 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -28,6 +28,7 @@ #ifndef FMT_FORMAT_H_ #define FMT_FORMAT_H_ +#define FMT_INCLUDE #include #include #include @@ -39,6 +40,7 @@ #include #include #include // for std::pair +#undef FMT_INCLUDE // The fmt library version in the form major * 10000 + minor * 100 + patch. #define FMT_VERSION 40000 diff --git a/fmt/string.h b/fmt/string.h index ccf46ee1..2f487f4d 100644 --- a/fmt/string.h +++ b/fmt/string.h @@ -7,6 +7,10 @@ For the license information refer to format.h. */ +#ifdef FMT_INCLUDE +# error Add the fmt's parent directory and not fmt itself to includes. +#endif + #ifndef FMT_STRING_H_ #define FMT_STRING_H_