-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.h
61 lines (48 loc) · 1.43 KB
/
Build.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#pragma warning(disable : 4251)
#include "Platform.h"
#include "Compiler.h"
extern "C" void flmain();
namespace fl
{
extern void runtimeAssert(bool condition);
extern void runtimeAssert(bool condition, const char *message);
}
#ifdef _DEBUG
#define FL_DEBUG
#else
#define FL_RELEASE
#endif
#define FL_ASSERT(condition) FL::runtimeAssert(condition)
#define FL_ASSERT_M(condition, message) FL::runtimeAssert(condition, message)
#define FL_STATIC_ASSERT(condition) static_assert(condition)
#ifdef FL_DEBUG
#define FL_DEBUG_ASSERT(condition) FL_ASSERT(condition)
#define FL_DEBUG_ASSERT_M(condition, message) FL_ASSERT_M(condition, message)
#define FL_RELEASE_ASSERT(condition)
#define FL_RELEASE_ASSERT_M(condition)
#else
#define FL_DEBUG_ASSERT(condition)
#define FL_DEBUG_ASSERT_M(condition, message)
#define FL_RELEASE_ASSERT(condition) FL_ASSERT(condition)
#define FL_RELEASE_ASSERT_M(condition, message) FL_ASSERT_M(condition, message)
#endif
#ifdef FL_PLATFORM_WINDOWS
#ifdef FL_DLL_EXPORT
#define FL_API __declspec(dllexport)
#elif defined(FL_DLL_IMPORT)
#define FL_API __declspec(dllimport)
#else
#define FL_API
#endif
#else
#define FL_API
#endif
#define FL_CONSTEXPR constexpr
#define FL_COPY_MEMORY(source, destination, size) memcpy(destination, source, size)
#define FL_ZERO_MEMORY(block, size) memset(block, 0, size)
#ifdef FL_VISUAL_C_PLUS_PLUS
#define FL_FORCE_INLINE __forceinline
#else
#define FL_FORCE_INLINE inline
#endif