OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
config.hpp
1#pragma once
2#if __has_include(<ossia-config.hpp>)
3#include <ossia-config.hpp>
4#endif
5
6#if __has_include(<ossia_export.h>)
7#include <ossia_export.h>
8#else
9#define OSSIA_EXPORT
10#endif
11
12#if defined(__APPLE__)
13#include <MacTypes.h>
14#if defined(nil)
15#undef nil
16#endif
17#endif
18
19#define OSSIA_EXTERN_EXPORT_HPP(EXPORT) EXPORT
20#define OSSIA_EXTERN_EXPORT_CPP(EXPORT)
21
22#undef OSSIA_DEPRECATED
23#if defined(__clang__) || defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ >= 13))
24#define OSSIA_DEPRECATED(REASON) [[deprecated(REASON)]]
25#else
26#define OSSIA_DEPRECATED(REASON)
27#endif
28
30#define constexpr_return(X) \
31 do \
32 { \
33 constexpr auto constexpr_return_x_ = X; \
34 return constexpr_return_x_; \
35 } while(0)
36
38#if defined(__cpp_exceptions)
39#define ossia_do_throw(E, X) throw E(X);
40#else
41#define ossia_do_throw(E, X) std::terminate();
42#undef OSSIA_HAS_FMT
43#undef OSSIA_HAS_RE2
44#undef OSSIA_HAS_CTRE
45#undef OSSIA_HAS_RAPIDFUZZ
46#endif
47
49#if defined(__GNUC__)
50#define OSSIA_INLINE inline __attribute__((always_inline))
51#elif defined(__clang__)
52#define OSSIA_INLINE inline __attribute__((always_inline))
53#elif defined(_MSC_VER)
54#define OSSIA_INLINE inline __forceinline
55#else
56#define OSSIA_INLINE inline
57#endif
58
59#define _WEBSOCKETPP_CPP11_STRICT_ 1
60
61#if defined(__SANITIZE_ADDRESS__)
62#define OSSIA_ASAN 1
63#elif defined(__has_feature)
64#if __has_feature(address_sanitizer)
65#define OSSIA_ASAN 1
66#endif
67#endif
68
70#if !defined(OSSIA_ASAN)
71#if defined(__AVX__)
72#define RAPIDJSON_SSE42 1
73#elif defined(__SSE2__)
74#define RAPIDJSON_SSE2 1
75#endif
76
77#if defined(__ARM_NEON)
78#define RAPIDJSON_NEON 1
79#endif
80#endif
81
82#if !defined(RAPIDJSON_HAS_STDSTRING)
83#define RAPIDJSON_HAS_STDSTRING 1
84#endif
85
86// Gives our rapidjson its own symbols, so that a static link with another copy
87// (e.g. Qt Quick 3D's assimp) does not merge their inline functions. Defined
88// here so that header-only users (JIT, SDK add-ons) match the library.
89#if !defined(RAPIDJSON_NAMESPACE_BEGIN)
90#define RAPIDJSON_NAMESPACE_BEGIN \
91 namespace rapidjson \
92 { \
93 inline namespace ossia \
94 {
95#define RAPIDJSON_NAMESPACE_END \
96 } \
97 }
98#endif
99
100// https://github.com/Tencent/rapidjson/issues/1015
101#if !defined(RAPIDJSON_HAS_CXX11_RVALUE_REFS)
102#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
103#endif
104
105#if defined(RAPIDJSON_PARSE_DEFAULT_FLAGS)
106#error Include <ossia/detail/json.hpp> to use JSON
107#endif
108#define RAPIDJSON_PARSE_DEFAULT_FLAGS \
109 kParseCommentsFlag | kParseTrailingCommasFlag | kParseNanAndInfFlag
110
111#if !defined(BOOST_MATH_DISABLE_FLOAT128)
112#define BOOST_MATH_DISABLE_FLOAT128
113#endif
114
116#define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE 1
117#define BOOST_ERROR_CODE_HEADER_ONLY 1
118#define BOOST_SYSTEM_NO_DEPRECATED 1
119#define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE 1
120
121// Disable parallel stl as otherwise
122// we need to link against TBB on GCC Linux...
123#define BOOST_UNORDERED_DISABLE_PARALLEL_ALGORITHMS 1
124
125#if !defined(BOOST_REGEX_NO_LIB)
126#define BOOST_REGEX_NO_LIB 1
127#endif
128
129#if !defined(BOOST_DATE_TIME_NO_LIB)
130#define BOOST_DATE_TIME_NO_LIB 1
131#endif
132
133#if !defined(BOOST_SYSTEM_NO_LIB)
134#define BOOST_SYSTEM_NO_LIB 1
135#endif
136
137// #if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES)
138// #define BOOST_GRAPH_NO_BUNDLED_PROPERTIES 1
139// #endif
140
141#if !defined(QT_NO_KEYWORDS)
142#define QT_NO_KEYWORDS 1
143#endif
144
145#if defined(OSSIA_TESTING)
146#define OSSIA_TEST_EXPORT OSSIA_EXPORT
147#else
148#define OSSIA_TEST_EXPORT
149#endif
150
151#if defined(__clang__) && defined(__has_attribute)
152#if __has_attribute(__no_sanitize__)
153#define OSSIA_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK \
154 __attribute__((__no_sanitize__("integer")))
155#endif
156#endif
157
158#if !defined(OSSIA_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK)
159#define OSSIA_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
160#endif