diff options
| author | Martin Hořeňovský | 2020-05-10 10:20:48 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-05-10 15:37:29 +0200 |
| commit | 7efbc83ae0393500692851525b89cfa890f3cee0 (patch) | |
| tree | b00e6d57b2753d675fc9201a341c49cb6788cfaf /src/catch2/interfaces | |
| parent | 9e498278be92ff209687a09b989f27d51aab7809 (diff) | |
| download | catch3-7efbc83ae0393500692851525b89cfa890f3cee0.tar.gz | |
Introduce combined TUs for compiling small TUs
This should improve the compilation times by decreasing the number
of TUs compiled, without making overly big TUs that would cause
problems with heavy-tailed compilation times.
There is one "combined TU" for the top level part, and each subpart,
except for Reporters, which currently do not have any trivial TUs.
Diffstat (limited to 'src/catch2/interfaces')
7 files changed, 79 insertions, 33 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_capture.cpp b/src/catch2/interfaces/catch_interfaces_capture.cpp deleted file mode 100644 index f49626e0..00000000 --- a/src/catch2/interfaces/catch_interfaces_capture.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include <catch2/interfaces/catch_interfaces_capture.hpp> - -namespace Catch { - IResultCapture::~IResultCapture() = default; -} diff --git a/src/catch2/interfaces/catch_interfaces_combined_tu.cpp b/src/catch2/interfaces/catch_interfaces_combined_tu.cpp new file mode 100644 index 00000000..e35b865e --- /dev/null +++ b/src/catch2/interfaces/catch_interfaces_combined_tu.cpp @@ -0,0 +1,79 @@ +/** \file + * This is a special TU that combines what would otherwise be a very + * small interfaces-related TUs into one bigger TU. + * + * The reason for this is compilation performance improvements by + * avoiding reparsing headers for many small TUs, instead having this + * one TU include bit more, but having it all parsed only once. + * + * To avoid heavy-tail problem with compilation times, each "subpart" + * of Catch2 has its own combined TU like this. + */ + +/////////////////////////////////////////////////// +// vvv formerly catch_interfaces_capture.cpp vvv // +/////////////////////////////////////////////////// + +#include <catch2/interfaces/catch_interfaces_capture.hpp> + +namespace Catch { + IResultCapture::~IResultCapture() = default; +} + + +////////////////////////////////////////////////// +// vvv formerly catch_interfaces_config.cpp vvv // +////////////////////////////////////////////////// + +#include <catch2/interfaces/catch_interfaces_config.hpp> + +namespace Catch { + IConfig::~IConfig() = default; +} + + +///////////////////////////////////////////////////// +// vvv formerly catch_interfaces_exception.cpp vvv // +///////////////////////////////////////////////////// + +#include <catch2/interfaces/catch_interfaces_exception.hpp> + +namespace Catch { + IExceptionTranslator::~IExceptionTranslator() = default; + IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default; +} + + +//////////////////////////////////////////////////////// +// vvv formerly catch_interfaces_registry_hub.cpp vvv // +//////////////////////////////////////////////////////// + +#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> + +namespace Catch { + IRegistryHub::~IRegistryHub() = default; + IMutableRegistryHub::~IMutableRegistryHub() = default; +} + + +////////////////////////////////////////////////// +// vvv formerly catch_interfaces_runner.cpp vvv // +////////////////////////////////////////////////// + +#include <catch2/interfaces/catch_interfaces_runner.hpp> + +namespace Catch { + IRunner::~IRunner() = default; +} + + +//////////////////////////////////////////////////// +// vvv formerly catch_interfaces_testcase.cpp vvv // +//////////////////////////////////////////////////// + +#include <catch2/interfaces/catch_interfaces_testcase.hpp> + +namespace Catch { + ITestInvoker::~ITestInvoker() = default; + ITestCaseRegistry::~ITestCaseRegistry() = default; +} diff --git a/src/catch2/interfaces/catch_interfaces_config.cpp b/src/catch2/interfaces/catch_interfaces_config.cpp deleted file mode 100644 index b451278c..00000000 --- a/src/catch2/interfaces/catch_interfaces_config.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include <catch2/interfaces/catch_interfaces_config.hpp> - -namespace Catch { - IConfig::~IConfig() = default; -} diff --git a/src/catch2/interfaces/catch_interfaces_exception.cpp b/src/catch2/interfaces/catch_interfaces_exception.cpp deleted file mode 100644 index 6d6db336..00000000 --- a/src/catch2/interfaces/catch_interfaces_exception.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <catch2/interfaces/catch_interfaces_exception.hpp> - -namespace Catch { - IExceptionTranslator::~IExceptionTranslator() = default; - IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default; -} diff --git a/src/catch2/interfaces/catch_interfaces_registry_hub.cpp b/src/catch2/interfaces/catch_interfaces_registry_hub.cpp deleted file mode 100644 index 1dfd0f6f..00000000 --- a/src/catch2/interfaces/catch_interfaces_registry_hub.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <catch2/interfaces/catch_interfaces_registry_hub.hpp> - -namespace Catch { - IRegistryHub::~IRegistryHub() = default; - IMutableRegistryHub::~IMutableRegistryHub() = default; -} diff --git a/src/catch2/interfaces/catch_interfaces_runner.cpp b/src/catch2/interfaces/catch_interfaces_runner.cpp deleted file mode 100644 index a624b639..00000000 --- a/src/catch2/interfaces/catch_interfaces_runner.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include <catch2/interfaces/catch_interfaces_runner.hpp> - -namespace Catch { - IRunner::~IRunner() = default; -} diff --git a/src/catch2/interfaces/catch_interfaces_testcase.cpp b/src/catch2/interfaces/catch_interfaces_testcase.cpp deleted file mode 100644 index b43d05c9..00000000 --- a/src/catch2/interfaces/catch_interfaces_testcase.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <catch2/interfaces/catch_interfaces_testcase.hpp> - -namespace Catch { - ITestInvoker::~ITestInvoker() = default; - ITestCaseRegistry::~ITestCaseRegistry() = default; -} |