OSSIA
Open Scenario System for Interactive Application
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 // https://github.com/Tencent/rapidjson/issues/1015
87 #if !defined(RAPIDJSON_HAS_CXX11_RVALUE_REFS)
88 #define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
89 #endif
90 
91 #if defined(RAPIDJSON_PARSE_DEFAULT_FLAGS)
92 #error Include <ossia/detail/json.hpp> to use JSON
93 #endif
94 #define RAPIDJSON_PARSE_DEFAULT_FLAGS \
95  kParseCommentsFlag | kParseTrailingCommasFlag | kParseNanAndInfFlag
96 
97 #if !defined(BOOST_MATH_DISABLE_FLOAT128)
98 #define BOOST_MATH_DISABLE_FLOAT128
99 #endif
100 
102 #define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE 1
103 #define BOOST_ERROR_CODE_HEADER_ONLY 1
104 #define BOOST_SYSTEM_NO_DEPRECATED 1
105 #define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE 1
106 
107 // Disable parallel stl as otherwise
108 // we need to link against TBB on GCC Linux...
109 #define BOOST_UNORDERED_DISABLE_PARALLEL_ALGORITHMS 1
110 
111 #if !defined(BOOST_REGEX_NO_LIB)
112 #define BOOST_REGEX_NO_LIB 1
113 #endif
114 
115 #if !defined(BOOST_DATE_TIME_NO_LIB)
116 #define BOOST_DATE_TIME_NO_LIB 1
117 #endif
118 
119 #if !defined(BOOST_SYSTEM_NO_LIB)
120 #define BOOST_SYSTEM_NO_LIB 1
121 #endif
122 
123 // #if !defined(BOOST_GRAPH_NO_BUNDLED_PROPERTIES)
124 // #define BOOST_GRAPH_NO_BUNDLED_PROPERTIES 1
125 // #endif
126 
127 #if !defined(QT_NO_KEYWORDS)
128 #define QT_NO_KEYWORDS 1
129 #endif