UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GenericPlatformCompilerPreSetup.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// HEADER_UNIT_SKIP - Cause cirular dependencies for header units
6
7#ifndef PRAGMA_DISABLE_DEPRECATION_WARNINGS
8 #define PRAGMA_DISABLE_DEPRECATION_WARNINGS
9#endif
10
11#ifndef PRAGMA_ENABLE_DEPRECATION_WARNINGS
12 #define PRAGMA_ENABLE_DEPRECATION_WARNINGS
13#endif
14
15#ifndef EMIT_CUSTOM_WARNING_AT_LINE
16 #define EMIT_CUSTOM_WARNING_AT_LINE(Line, Warning)
17#endif // EMIT_CUSTOM_WARNING_AT_LINE
18
19#ifndef EMIT_CUSTOM_ERROR_AT_LINE
20 #define EMIT_CUSTOM_ERROR_AT_LINE(Line, Error)
21#endif // EMIT_CUSTOM_ERROR_AT_LINE
22
23#ifndef EMIT_CUSTOM_WARNING
24 #define EMIT_CUSTOM_WARNING(Warning) \
25 EMIT_CUSTOM_WARNING_AT_LINE(__LINE__, Warning)
26#endif // EMIT_CUSTOM_WARNING
27
28#ifndef EMIT_CUSTOM_ERROR
29 #define EMIT_CUSTOM_ERROR(Error) \
30 EMIT_CUSTOM_ERROR_AT_LINE(__LINE__, Error)
31#endif // EMIT_CUSTOM_ERROR
32
33#ifndef UE_DEPRECATED_MACRO
34 #if UE_WARNINGS_AS_ERRORS
35 #define UE_DEPRECATED_MACRO(Version, Message) EMIT_CUSTOM_ERROR(Message " - Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")
36 #else
37 #define UE_DEPRECATED_MACRO(Version, Message) EMIT_CUSTOM_WARNING(Message " - Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.")
38 #endif
39#endif
40
41#ifndef DEPRECATED_MACRO
42 #define DEPRECATED_MACRO(Version, Message) UE_DEPRECATED_MACRO(5.1, "The DEPRECATED_MACRO macro has been deprecated in favor of UE_DEPRECATED_MACRO.") UE_DEPRECATED_MACRO(Version, Message)
43#endif
44
45#ifndef PRAGMA_DEFAULT_VISIBILITY_START
46 #define PRAGMA_DEFAULT_VISIBILITY_START
47#endif
48
49#ifndef PRAGMA_DEFAULT_VISIBILITY_END
50 #define PRAGMA_DEFAULT_VISIBILITY_END
51#endif
52
53#ifndef PRAGMA_DISABLE_BUFFER_OVERRUN_WARNING
54 #define PRAGMA_DISABLE_BUFFER_OVERRUN_WARNING
55#endif
56
57#ifndef PRAGMA_ENABLE_BUFFER_OVERRUN_WARNING
58 #define PRAGMA_ENABLE_BUFFER_OVERRUN_WARNING
59#endif
60
61// Disable CA warnings around SDK includes - default to those disabled at the compiler level
62#ifndef THIRD_PARTY_INCLUDES_START
63 #define THIRD_PARTY_INCLUDES_START UE_COMPILER_THIRD_PARTY_INCLUDES_START
64#endif
65
66#ifndef THIRD_PARTY_INCLUDES_END
67 #define THIRD_PARTY_INCLUDES_END UE_COMPILER_THIRD_PARTY_INCLUDES_END
68#endif
69
70#ifndef PGO_LINK_DISABLE_WARNINGS
71 #define PGO_LINK_DISABLE_WARNINGS
72#endif
73
74#ifndef PGO_LINK_ENABLE_WARNINGS
75 #define PGO_LINK_ENABLE_WARNINGS
76#endif