blob: 0a7f2e2cafa19331c87a3db2793ab413ec1b0858 (
plain) (
blame)
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
|
// Copyright 2011-2022, Molecular Matters GmbH <[email protected]>
// See LICENSE.txt for licensing details (2-clause BSD License: https://opensource.org/licenses/BSD-2-Clause)
#pragma once
#include "Foundation/PDB_Warnings.h"
// The following clang warnings must be disabled for the examples to build with 0 warnings
#if PDB_COMPILER_CLANG
# pragma clang diagnostic ignored "-Wformat-nonliteral" // format string is not a string literal
# pragma clang diagnostic ignored "-Wswitch-default" // switch' missing 'default' label
# pragma clang diagnostic ignored "-Wcast-align" // increases required alignment from X to Y
# pragma clang diagnostic ignored "-Wold-style-cast" // use of old-style cast
#endif
#if PDB_COMPILER_MSVC
# pragma warning(push, 0)
#elif PDB_COMPILER_CLANG
# pragma clang diagnostic push
#endif
#if PDB_COMPILER_MSVC
// we compile without exceptions
# define _ALLOW_RTCc_IN_STL
// triggered by Windows.h
# pragma warning (disable : 4668)
// triggered by xlocale in VS 2017
# pragma warning (disable : 4625) // copy constructor was implicitly defined as deleted
# pragma warning (disable : 4626) // assignment operator was implicitly defined as deleted
# pragma warning (disable : 5026) // move constructor was implicitly defined as deleted
# pragma warning (disable : 5027) // move assignment operator was implicitly defined as deleted
# pragma warning (disable : 4774) // format string expected in argument 1 is not a string literal
#endif
#ifdef _WIN32
# define NOMINMAX
# include <Windows.h>
# undef cdecl
#endif
# include <vector>
# include <unordered_set>
# include <chrono>
# include <string>
# include <algorithm>
# include <cstdarg>
#if PDB_COMPILER_MSVC
# pragma warning(pop)
#elif PDB_COMPILER_CLANG
# pragma clang diagnostic pop
#endif
|