ufe
4.2
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.10-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
//==============================================================================
36
// COMPILER DETECTION
37
//==============================================================================
38
39
#if defined(__clang__)
40
// Clang C++ emulates GCC and MSC, so it has to appear early.
41
#define PEPTIDE_IS_CLANG 1
42
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
43
// Intel emulates MSC, so it has to appear early.
44
#define PEPTIDE_IS_INTEL 1
45
#elif defined(__GNUC__)
46
// GNU C++.
47
#define PEPTIDE_IS_GCC 1
48
#elif defined(_MSC_VER)
49
// Microsoft visual studio
50
#define PEPTIDE_IS_MSC 1
51
#else
52
#error "Unknown compiler configuration..."
53
#endif
54
55
56
// MSC Compiler versions
57
#ifdef PEPTIDE_IS_MSC
58
59
#if _MSC_VER <= 1900
60
#define PEPTIDE_AT_MOST_MSVC2015 1
61
#endif
62
63
#endif
64
65
66
// Default values...
67
#ifndef PEPTIDE_IS_CLANG
68
#define PEPTIDE_IS_CLANG 0
69
#endif
70
71
#ifndef PEPTIDE_IS_GCC
72
#define PEPTIDE_IS_GCC 0
73
#endif
74
75
#ifndef PEPTIDE_IS_INTEL
76
#define PEPTIDE_IS_INTEL 0
77
#endif
78
79
#ifndef PEPTIDE_IS_MSC
80
#define PEPTIDE_IS_MSC 0
81
#endif
82
83
#ifndef PEPTIDE_AT_MOST_MSVC2015
84
#define PEPTIDE_AT_MOST_MSVC2015 0
85
#endif
86
87
88
//==============================================================================
89
// FEATURE DETECTION
90
//==============================================================================
91
92
// Stub out __has_feature when not supported by a given compiler
93
#ifndef __has_feature
94
#define __has_feature(x) 0
95
#endif
96
97
//==============================================================================
98
// COMPATIBILITY ACROSS C++ STANDARDS.
99
//==============================================================================
100
128
#if __cplusplus >= 202002L
129
#define PEPTIDE_CXX20_CAPTURE_THIS , this
130
#else
131
#define PEPTIDE_CXX20_CAPTURE_THIS
132
#endif
133
134
//==============================================================================
135
// COMPILER CAPABILITIES
136
//==============================================================================
137
142
#if __has_feature(cxx_rtti) || defined(__GXX_RTTI) || defined(_CPPRTTI)
143
#define PEPTIDE_HAS_CXX_RTTI 1
144
#else
145
#define PEPTIDE_HAS_CXX_RTTI 0
146
#endif
147
153
#if PEPTIDE_IS_MSC || PEPTIDE_IS_INTEL
154
155
#define PEPTIDE_FORCEINLINE __forceinline
156
157
#elif PEPTIDE_IS_GCC || PEPTIDE_IS_CLANG
158
159
#define PEPTIDE_FORCEINLINE inline __attribute__((always_inline))
160
161
#endif
162
177
#if PEPTIDE_IS_MSC
178
179
#define PEPTIDE_NOINLINE __declspec(noinline)
180
181
#elif PEPTIDE_IS_GCC || PEPTIDE_IS_CLANG || PEPTIDE_IS_INTEL
182
183
#define PEPTIDE_NOINLINE __attribute__((noinline))
184
185
#endif
186
201
#if PEPTIDE_IS_MSC
202
#define PEPTIDE_ENABLE_ECBO __declspec(empty_bases)
203
#else
204
#define PEPTIDE_ENABLE_ECBO
205
#endif
206
207
//==============================================================================
208
// EXPORT DIRECTIVES
209
//==============================================================================
210
216
#if PEPTIDE_IS_GCC || PEPTIDE_IS_CLANG
217
#define PEPTIDE_EXPORT_UNIX __attribute__((visibility("default")))
218
#else
219
#define PEPTIDE_EXPORT_UNIX
220
#endif
221
222
#endif
common
include
peptide
config
CfgCompilerMacros.h
Generated on Fri Jun 2 2023 07:30:07 for ufe by
1.8.14