You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
doctest: Patch for clang warning about replacing <ciso646> by <version>
This commit is contained in:
10
thirdparty/doctest/doctest.h
vendored
10
thirdparty/doctest/doctest.h
vendored
@@ -490,14 +490,20 @@ DOCTEST_GCC_SUPPRESS_WARNING_POP
|
|||||||
#endif
|
#endif
|
||||||
#endif // DOCTEST_CONFIG_USE_IOSFWD
|
#endif // DOCTEST_CONFIG_USE_IOSFWD
|
||||||
|
|
||||||
// for clang - always include ciso646 (which drags some std stuff) because
|
// BEGIN TEMPORARY PATCH (comes from https://github.com/doctest/doctest/pull/901)
|
||||||
// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in
|
// for clang - always include <version> or <ciso646> (which drags some std stuff)
|
||||||
|
// because we want to check if we are using libc++ with the _LIBCPP_VERSION macro in
|
||||||
// which case we don't want to forward declare stuff from std - for reference:
|
// which case we don't want to forward declare stuff from std - for reference:
|
||||||
// https://github.com/doctest/doctest/issues/126
|
// https://github.com/doctest/doctest/issues/126
|
||||||
// https://github.com/doctest/doctest/issues/356
|
// https://github.com/doctest/doctest/issues/356
|
||||||
#if DOCTEST_CLANG
|
#if DOCTEST_CLANG
|
||||||
|
#if DOCTEST_CPLUSPLUS >= 201703L && __has_include(<version>)
|
||||||
|
#include <version>
|
||||||
|
#else
|
||||||
#include <ciso646>
|
#include <ciso646>
|
||||||
|
#endif
|
||||||
#endif // clang
|
#endif // clang
|
||||||
|
// END TEMPORARY PATCH
|
||||||
|
|
||||||
#ifdef _LIBCPP_VERSION
|
#ifdef _LIBCPP_VERSION
|
||||||
#ifndef DOCTEST_CONFIG_USE_STD_HEADERS
|
#ifndef DOCTEST_CONFIG_USE_STD_HEADERS
|
||||||
|
|||||||
27
thirdparty/doctest/patches/0000-ciso646-version.patch
vendored
Normal file
27
thirdparty/doctest/patches/0000-ciso646-version.patch
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
diff --git a/thirdparty/doctest/doctest.h b/thirdparty/doctest/doctest.h
|
||||||
|
index 5c754cde08a..482749ccb2b 100644
|
||||||
|
--- a/thirdparty/doctest/doctest.h
|
||||||
|
+++ b/thirdparty/doctest/doctest.h
|
||||||
|
@@ -490,14 +490,20 @@ DOCTEST_GCC_SUPPRESS_WARNING_POP
|
||||||
|
#endif
|
||||||
|
#endif // DOCTEST_CONFIG_USE_IOSFWD
|
||||||
|
|
||||||
|
-// for clang - always include ciso646 (which drags some std stuff) because
|
||||||
|
-// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in
|
||||||
|
+// BEGIN TEMPORARY PATCH (comes from https://github.com/doctest/doctest/pull/901)
|
||||||
|
+// for clang - always include <version> or <ciso646> (which drags some std stuff)
|
||||||
|
+// because we want to check if we are using libc++ with the _LIBCPP_VERSION macro in
|
||||||
|
// which case we don't want to forward declare stuff from std - for reference:
|
||||||
|
// https://github.com/doctest/doctest/issues/126
|
||||||
|
// https://github.com/doctest/doctest/issues/356
|
||||||
|
#if DOCTEST_CLANG
|
||||||
|
+#if DOCTEST_CPLUSPLUS >= 201703L && __has_include(<version>)
|
||||||
|
+#include <version>
|
||||||
|
+#else
|
||||||
|
#include <ciso646>
|
||||||
|
+#endif
|
||||||
|
#endif // clang
|
||||||
|
+// END TEMPORARY PATCH
|
||||||
|
|
||||||
|
#ifdef _LIBCPP_VERSION
|
||||||
|
#ifndef DOCTEST_CONFIG_USE_STD_HEADERS
|
||||||
Reference in New Issue
Block a user