Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-08-01 19:09:18 +0200
committerMartin Hořeňovský2020-08-03 22:57:43 +0200
commita4ac07d1049e8cafdd5b9ab551055a6bddcc132d (patch)
tree46056b77e29c6ac6330c22ecc524c92d0194e521 /src/catch2/internal
parent8b0845b1a2a95a3546ccd9ef8c8929aef5256310 (diff)
downloadcatch3-a4ac07d1049e8cafdd5b9ab551055a6bddcc132d.tar.gz
Split out default CATCH_CONFIG_CONSOLE_WIDTH into its own header
This means that code that uses it no longer has to include all of catch_config.hpp, which seems to provide significant reduction in size of unoptimized compilation of the final static library.
Diffstat (limited to 'src/catch2/internal')
-rw-r--r--src/catch2/internal/catch_clara.hpp3
-rw-r--r--src/catch2/internal/catch_console_width.hpp8
2 files changed, 9 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_clara.hpp b/src/catch2/internal/catch_clara.hpp
index 2420a1d8..19db5492 100644
--- a/src/catch2/internal/catch_clara.hpp
+++ b/src/catch2/internal/catch_clara.hpp
@@ -9,8 +9,7 @@
#ifndef TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
#define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
-// For CATCH_CONFIG_CONSOLE_WIDTH. We should refactor this out somewhere else.
-#include <catch2/catch_config.hpp>
+#include <catch2/internal/catch_console_width.hpp>
// Use Catch's value for console width (store Clara's off to the side, if present)
#ifdef CLARA_CONFIG_CONSOLE_WIDTH
diff --git a/src/catch2/internal/catch_console_width.hpp b/src/catch2/internal/catch_console_width.hpp
new file mode 100644
index 00000000..8bb3b83a
--- /dev/null
+++ b/src/catch2/internal/catch_console_width.hpp
@@ -0,0 +1,8 @@
+#ifndef CATCH_CONSOLE_WIDTH_HPP_INCLUDED
+#define CATCH_CONSOLE_WIDTH_HPP_INCLUDED
+
+#ifndef CATCH_CONFIG_CONSOLE_WIDTH
+#define CATCH_CONFIG_CONSOLE_WIDTH 80
+#endif
+
+#endif // CATCH_CONSOLE_WIDTH_HPP_INCLUDED \ No newline at end of file