Skip to content

Commit 116a9ef

Browse files
committed
Workaround for pinned cista.h version not supporting strict -fno-exceptions
Newer clang version appears to enforce this. Ideally we will update to this version soon to avoid hacks: felixguendling/cista@a46b7d8
1 parent 31c56d7 commit 116a9ef

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

source/frontend/legacy_editor/views/PropertyEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Should be first
2-
#include <vendor/cista.h>
2+
#include <rsl/Reflection.hpp>
33

44
#include "PropertyEditor.hpp"
55
#include <frontend/widgets/PropertyEditorWidget.hpp>

source/rsl/Reflection.hpp

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,58 @@
55
#pragma clang diagnostic ignored "-Wmissing-braces"
66
#endif
77

8+
// Copied from cista.h: We don't want Windows.h imported when our custom macros are defined
9+
#ifdef _WIN32
10+
#ifndef WIN32_LEAN_AND_MEAN
11+
#define WIN32_LEAN_AND_MEAN
12+
#endif
13+
#ifndef NOMINMAX
14+
#define NOMINMAX
15+
#endif
16+
#include <io.h>
17+
#include <windows.h>
18+
#else
19+
#include <sys/mman.h>
20+
#include <sys/types.h>
21+
#include <unistd.h>
22+
#endif
23+
24+
25+
#ifdef _WIN32
26+
#ifndef WIN32_LEAN_AND_MEAN
27+
#define WIN32_LEAN_AND_MEAN
28+
#endif
29+
#ifndef NOMINMAX
30+
#define NOMINMAX
31+
#endif
32+
#include <io.h>
33+
#include <windows.h>
34+
#endif
35+
36+
#include <cinttypes>
37+
#include <memory>
38+
39+
40+
#include <cstdlib>
41+
#include <cstring>
42+
43+
44+
#include <stdexcept>
45+
46+
47+
#include <exception>
48+
49+
// End of copied region
50+
51+
#include <chrono>
52+
53+
#define throw
54+
#define try if (1)
55+
#define catch(...) else
856
#include <vendor/cista.h>
57+
#undef throw
58+
#undef try
59+
#undef catch
960

1061
#ifdef __clang__
1162
#pragma clang diagnostic pop

0 commit comments

Comments
 (0)