diff options
| author | Martin Hořeňovský | 2022-06-21 16:19:50 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-06-21 18:48:44 +0200 |
| commit | 8730260457ddbd19f3df70c53931934398fc54d7 (patch) | |
| tree | 8ffede0fbd3b564aa2e16daad1d7c60a95fa5020 /src/catch2/generators/catch_generators.cpp | |
| parent | bdfa920f931f186edf3c3042d49ddd341c4dbfc9 (diff) | |
| download | catch3-8730260457ddbd19f3df70c53931934398fc54d7.tar.gz | |
Split apart combined TUs
The compile time improvements from using combined TUs mostly isn't
worth the annoyance they cause with various IDE shortcuts, like
when switching between header and its impl. file.
Splitting them apart also fixes the issue of empty subdirs being
installed due to `foo/internal` folders that only contained the
combined TUs and no headers.
Closes #2457
Closes #2463
Diffstat (limited to 'src/catch2/generators/catch_generators.cpp')
| -rw-r--r-- | src/catch2/generators/catch_generators.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/catch2/generators/catch_generators.cpp b/src/catch2/generators/catch_generators.cpp new file mode 100644 index 00000000..3e09bfd9 --- /dev/null +++ b/src/catch2/generators/catch_generators.cpp @@ -0,0 +1,35 @@ + +// Copyright Catch2 Authors +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// https://www.boost.org/LICENSE_1_0.txt) + +// SPDX-License-Identifier: BSL-1.0 + +#include <catch2/generators/catch_generators.hpp> +#include <catch2/internal/catch_enforce.hpp> +#include <catch2/generators/catch_generator_exception.hpp> +#include <catch2/interfaces/catch_interfaces_capture.hpp> + +namespace Catch { + + IGeneratorTracker::~IGeneratorTracker() = default; + +namespace Generators { + +namespace Detail { + + [[noreturn]] + void throw_generator_exception(char const* msg) { + Catch::throw_exception(GeneratorException{ msg }); + } +} // end namespace Detail + + GeneratorUntypedBase::~GeneratorUntypedBase() = default; + + auto acquireGeneratorTracker(StringRef generatorName, SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { + return getResultCapture().acquireGeneratorTracker( generatorName, lineInfo ); + } + +} // namespace Generators +} // namespace Catch |