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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-04-06 10:09:16 +0200
committerMartin Hořeňovský2020-04-24 14:25:33 +0200
commit3f2ada03d5ddf90d7236b9777bb6fcc08808ac8b (patch)
treed307320dc58b4c093fceb6478743009207d75710 /src/catch2
parent7892954c9972259ee8b6defe6d36285b99dcda2e (diff)
downloadcatch3-3f2ada03d5ddf90d7236b9777bb6fcc08808ac8b.tar.gz
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.
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/catch_default_main.hpp13
-rw-r--r--src/catch2/catch_impl.hpp33
2 files changed, 13 insertions, 33 deletions
diff --git a/src/catch2/catch_default_main.hpp b/src/catch2/catch_default_main.hpp
index a61ad98d..4f769695 100644
--- a/src/catch2/catch_default_main.hpp
+++ b/src/catch2/catch_default_main.hpp
@@ -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 );
}
diff --git a/src/catch2/catch_impl.hpp b/src/catch2/catch_impl.hpp
deleted file mode 100644
index 681110dc..00000000
--- a/src/catch2/catch_impl.hpp
+++ /dev/null
@@ -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