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
This commit is contained in:
Martin Hořeňovský 2022-05-23 23:57:34 +02:00
parent 3a18a688a0
commit 85c00eb946
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
1 changed files with 4 additions and 0 deletions

View File

@ -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 <catch2/catch_user_config.hpp>
#ifndef CATCH_CONFIG_CONSOLE_WIDTH
#define CATCH_CONFIG_CONSOLE_WIDTH 80
#endif