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 | |
| 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')
| -rw-r--r-- | src/catch2/generators/catch_generator_exception.cpp | 17 | ||||
| -rw-r--r-- | src/catch2/generators/catch_generators.cpp (renamed from src/catch2/generators/internal/catch_generators_combined_tu.cpp) | 30 |
2 files changed, 17 insertions, 30 deletions
diff --git a/src/catch2/generators/catch_generator_exception.cpp b/src/catch2/generators/catch_generator_exception.cpp new file mode 100644 index 00000000..70a991e3 --- /dev/null +++ b/src/catch2/generators/catch_generator_exception.cpp @@ -0,0 +1,17 @@ + +// 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_generator_exception.hpp> + +namespace Catch { + + const char* GeneratorException::what() const noexcept { + return m_msg; + } + +} // end namespace Catch diff --git a/src/catch2/generators/internal/catch_generators_combined_tu.cpp b/src/catch2/generators/catch_generators.cpp index da1b62e9..3e09bfd9 100644 --- a/src/catch2/generators/internal/catch_generators_combined_tu.cpp +++ b/src/catch2/generators/catch_generators.cpp @@ -5,36 +5,6 @@ // https://www.boost.org/LICENSE_1_0.txt) // SPDX-License-Identifier: BSL-1.0 -/** \file - * This is a special TU that combines what would otherwise be a very - * small generator-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_generator_exception.cpp vvv // -//////////////////////////////////////////////////// - -#include <catch2/generators/catch_generator_exception.hpp> - -namespace Catch { - - const char* GeneratorException::what() const noexcept { - return m_msg; - } - -} // end namespace Catch - - -/////////////////////////////////////////// -// vvv formerly catch_generators.cpp vvv // -/////////////////////////////////////////// #include <catch2/generators/catch_generators.hpp> #include <catch2/internal/catch_enforce.hpp> |