aboutsummaryrefslogtreecommitdiffstats
path: root/src/catch2/internal/catch_config_android_logwrite.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/catch2/internal/catch_config_android_logwrite.hpp')
-rw-r--r--src/catch2/internal/catch_config_android_logwrite.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/catch2/internal/catch_config_android_logwrite.hpp b/src/catch2/internal/catch_config_android_logwrite.hpp
new file mode 100644
index 0000000..490ee37
--- /dev/null
+++ b/src/catch2/internal/catch_config_android_logwrite.hpp
@@ -0,0 +1,33 @@
+
+// Copyright Catch2 Authors
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE.txt or copy at
+// https://www.boost.org/LICENSE_1_0.txt)
+
+// SPDX-License-Identifier: BSL-1.0
+
+/** \file
+ * Wrapper for ANDROID_LOGWRITE configuration option
+ *
+ * We want to default to enabling it when compiled for android, but
+ * users of the library should also be able to disable it if they want
+ * to.
+ */
+
+#ifndef CATCH_CONFIG_ANDROID_LOGWRITE_HPP_INCLUDED
+#define CATCH_CONFIG_ANDROID_LOGWRITE_HPP_INCLUDED
+
+#include <catch2/catch_user_config.hpp>
+
+#if defined(__ANDROID__)
+# define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE
+#endif
+
+
+#if defined( CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE ) && \
+ !defined( CATCH_CONFIG_NO_ANDROID_LOGWRITE ) && \
+ !defined( CATCH_CONFIG_ANDROID_LOGWRITE )
+# define CATCH_CONFIG_ANDROID_LOGWRITE
+#endif
+
+#endif // CATCH_CONFIG_ANDROID_LOGWRITE_HPP_INCLUDED