From 85c00eb946b04a55a41aa131fb3f2050fa2f8b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 23 May 2022 23:57:34 +0200 Subject: [PATCH] Ensure that console_width.hpp includes user_config.hpp first Otherwise we can get macro redefinition warnings when another file includes console_width.hpp first, before user_config.hpp. Closes #2431 --- src/catch2/internal/catch_console_width.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/catch2/internal/catch_console_width.hpp b/src/catch2/internal/catch_console_width.hpp index ad868e33..7156ec4e 100644 --- a/src/catch2/internal/catch_console_width.hpp +++ b/src/catch2/internal/catch_console_width.hpp @@ -8,6 +8,10 @@ #ifndef CATCH_CONSOLE_WIDTH_HPP_INCLUDED #define CATCH_CONSOLE_WIDTH_HPP_INCLUDED +// This include must be kept so that user's configured value for CONSOLE_WIDTH +// is used before we attempt to provide a default value +#include + #ifndef CATCH_CONFIG_CONSOLE_WIDTH #define CATCH_CONFIG_CONSOLE_WIDTH 80 #endif