ufe
5.5
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
CfgCompilerMacros.h
Go to the documentation of this file.
1
#line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.11-windows/ufe/gitmodules/peptide/src/config/CfgCompilerMacros.h"
2
//-
3
// =============================================================================
4
// Copyright 2021 Autodesk, Inc. All rights reserved.
5
//
6
// Use of this software is subject to the terms of the Autodesk license
7
// agreement provided at the time of installation or download, or which
8
// otherwise accompanies this software in either electronic or hard copy form.
9
// =============================================================================
10
//+
11
14
15
16
#ifndef PEPTIDE_CFG_COMPILER_MACROS_H
17
#define PEPTIDE_CFG_COMPILER_MACROS_H
18
19
20
//==============================================================================
21
// PLATFORM DETECTION
22
//==============================================================================
23
24
#if defined(_WIN32)
25
#define PEPTIDE_WINDOWS
26
#elif defined(__linux__)
27
#define PEPTIDE_LINUX
28
#elif defined(__APPLE__)
29
#define PEPTIDE_OSX
30
#else
31
#error "Unsupported platform..."
32
#endif
33
34
//==============================================================================
35
// COMPILER TARGET DETECTION - the arch compiler is compiling for.
36
//==============================================================================
37
// GCC and clang defines __aarch64__
38
// MSVC defines _M_ARM64
39
#if (defined(__aarch64__) || defined(_M_ARM64))
40
#define PEPTIDE_ARCH_IS_ARM64 1
41
#define PEPTIDE_ARCH_IS_X86_64 0
42
#elif (defined (__x86_64__) || defined(_M_AMD64))
43
#define PEPTIDE_ARCH_IS_X86_64 1
44
#define PEPTIDE_ARCH_IS_ARM64 0
45
#else
46
#define PEPTIDE_ARCH_IS_X86_64 0
47
#define PEPTIDE_ARCH_IS_ARM64 0
48
#endif
49
50
51
//==============================================================================
52
// COMPILER DETECTION
53
//==============================================================================
54
55
#if defined(__clang__)
56
// Clang C++ emulates GCC and MSC, so it has to appear early.
57
#define PEPTIDE_IS_CLANG 1
58
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
59
// Intel emulates MSC, so it has to appear early.
60
#define PEPTIDE_IS_INTEL 1
61
#elif defined(__GNUC__)
62
// GNU C++.
63
#define PEPTIDE_IS_GCC 1
64
#elif defined(_MSC_VER)
65
// Microsoft visual studio
66
#define PEPTIDE_IS_MSC 1
67
#else
68
#error "Unknown compiler configuration..."
69
#endif
70
71
72
// MSC Compiler versions
73
#ifdef PEPTIDE_IS_MSC
74
75
#if _MSC_VER <= 1900
76
#define PEPTIDE_AT_MOST_MSVC2015 1
77
#endif
78
79
#endif
80
81
82
// Default values...
83
#ifndef PEPTIDE_IS_CLANG
84
#define PEPTIDE_IS_CLANG 0
85
#endif
86
87
#ifndef PEPTIDE_IS_GCC
88
#define PEPTIDE_IS_GCC 0
89
#endif
90
91
#ifndef PEPTIDE_IS_INTEL
92
#define PEPTIDE_IS_INTEL 0
93
#endif
94
95
#ifndef PEPTIDE_IS_MSC
96
#define PEPTIDE_IS_MSC 0
97
#endif
98
99
#ifndef PEPTIDE_AT_MOST_MSVC2015
100
#define PEPTIDE_AT_MOST_MSVC2015 0
101
#endif
102
103
104
//==============================================================================
105
// FEATURE DETECTION
106
//==============================================================================
107
108
// Stub out __has_feature when not supported by a given compiler
109
#ifndef __has_feature
110
#define __has_feature(x) 0
111
#endif
112
113
//==============================================================================
114
// COMPATIBILITY ACROSS C++ STANDARDS.
115
//==============================================================================
116
144
#if __cplusplus >= 202002L
145
#define PEPTIDE_CXX20_CAPTURE_THIS , this
146
#else
147
#define PEPTIDE_CXX20_CAPTURE_THIS
148
#endif
149
150
//==============================================================================
151
// COMPILER CAPABILITIES
152
//==============================================================================
153
158
#if __has_feature(cxx_rtti) || defined(__GXX_RTTI) || defined(_CPPRTTI)
159
#define PEPTIDE_HAS_CXX_RTTI 1
160
#else
161
#define PEPTIDE_HAS_CXX_RTTI 0
162
#endif
163
169
#if PEPTIDE_IS_MSC || PEPTIDE_IS_INTEL
170
171
#define PEPTIDE_FORCEINLINE __forceinline
172
173
#elif PEPTIDE_IS_GCC || PEPTIDE_IS_CLANG
174
175
#define PEPTIDE_FORCEINLINE inline __attribute__((always_inline))
176
177
#endif
178
193
#if PEPTIDE_IS_MSC
194
195
#define PEPTIDE_NOINLINE __declspec(noinline)
196
197
#elif PEPTIDE_IS_GCC || PEPTIDE_IS_CLANG || PEPTIDE_IS_INTEL
198
199
#define PEPTIDE_NOINLINE __attribute__((noinline))
200
201
#endif
202
217
#if PEPTIDE_IS_MSC
218
#define PEPTIDE_ENABLE_ECBO __declspec(empty_bases)
219
#else
220
#define PEPTIDE_ENABLE_ECBO
221
#endif
222
223
//==============================================================================
224
// EXPORT DIRECTIVES
225
//==============================================================================
226
232
#if PEPTIDE_IS_GCC || PEPTIDE_IS_CLANG
233
#define PEPTIDE_EXPORT_UNIX __attribute__((visibility("default"
)))
234
#else
235
#define PEPTIDE_EXPORT_UNIX
236
#endif
237
238
#endif
common
include
peptide
config
CfgCompilerMacros.h
Generated on Tue Sep 3 2024 09:29:42 for ufe by
1.9.4