Remove unused catch_impl.hpp header

It became useless when we moved away from the single-header model,
because it was used an entry point for stitching CPP into the single
header file.
This commit is contained in:
Martin Hořeňovský 2020-04-06 10:09:16 +02:00
parent 7892954c99
commit 3f2ada03d5
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
3 changed files with 13 additions and 34 deletions

View File

@ -60,7 +60,6 @@ set(INTERNAL_HEADERS
${SOURCES_DIR}/catch_generators.hpp
${SOURCES_DIR}/catch_generators_generic.hpp
${SOURCES_DIR}/catch_generators_specific.hpp
${SOURCES_DIR}/catch_impl.hpp
${SOURCES_DIR}/catch_interfaces_capture.h
${SOURCES_DIR}/catch_interfaces_config.h
${SOURCES_DIR}/catch_interfaces_enum_values_registry.h

View File

@ -9,8 +9,17 @@
#define TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED
#include <catch2/catch_session.h>
#include <catch2/catch_compiler_capabilities.h>
#include <catch2/catch_leak_detector.h>
#include <catch2/catch_platform.h>
namespace Catch {
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
LeakDetector leakDetector;
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
}
#ifndef __OBJC__
#if defined(CATCH_CONFIG_WCHAR) && defined(CATCH_PLATFORM_WINDOWS) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN)
@ -21,6 +30,10 @@ extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) {
int main (int argc, char * argv[]) {
#endif
// We want to force the linker not to discard the global variable
// and its constructor, as it (optionally) registers leak detector
(void)&Catch::leakDetector;
return Catch::Session().run( argc, argv );
}

View File

@ -1,33 +0,0 @@
/*
* Created by Phil on 5/8/2012.
* Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_CATCH_IMPL_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_IMPL_HPP_INCLUDED
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
// Keep these here for external reporters
#include <catch2/catch_test_spec.h>
#include <catch2/catch_test_case_tracker.h>
#include <catch2/catch_leak_detector.h>
// Cpp files will be included in the single-header file here
// ~*~* CATCH_CPP_STITCH_PLACE *~*~
namespace Catch {
LeakDetector leakDetector;
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TWOBLUECUBES_CATCH_IMPL_HPP_INCLUDED