forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtk_diy2.h.in
72 lines (53 loc) · 2.13 KB
/
vtk_diy2.h.in
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
62
63
64
65
66
67
68
69
70
71
72
/*=========================================================================
Program: Visualization Toolkit
Module: vtk_diy2.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtk_diy2
// .SECTION Description
#ifndef vtk_diy2_h
#define vtk_diy2_h
#cmakedefine VTK_USE_SYSTEM_DIY2
#define VTK_DIY2_QUOTE_HEADER_NAME(str) #str
#ifndef VTK_USE_SYSTEM_DIY2
# define VTK_DIY2_HEADER(header) VTK_DIY2_QUOTE_HEADER_NAME(header)
# define diy vtkdiy // mangle namespace diy
#else
# define VTK_DIY2_HEADER(header) #header
#endif
// disable warnings
#if defined(_MSC_VER)
# define VTKDIY2_WARNING_PRAGMAS
# define VTKDIY2_WARNINGS_PUSH __pragma(warning(push))
# define VTKDIY2_WARNINGS_POP __pragma(warning(pop))
#elif defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__PGI) // for GCC and Clang only
// Older versions of GCC don't support the push/pop pragmas and some dont
// recognize the suppressed warnings
# if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
# define VTKDIY2_WARNING_PRAGMAS \
_Pragma("GCC diagnostic ignored \"-Wshadow\"") \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") \
_Pragma("GCC diagnostic ignored \"-Wunused-result\"")
# define VTKDIY2_WARNINGS_PUSH _Pragma("GCC diagnostic push")
# define VTKDIY2_WARNINGS_POP _Pragma("GCC diagnostic pop")
# else // Older GCC / Clang
# define VTKDIY2_WARNING_PRAGMAS
# define VTKDIY2_WARNINGS_PUSH
# define VTKDIY2_WARNINGS_POP
# endif
#else // all other compilers
# define VTKDIY2_WARNING_PRAGMAS
# define VTKDIY2_WARNINGS_PUSH
# define VTKDIY2_WARNINGS_POP
#endif
#define VTKDIY2_PRE_INCLUDE \
VTKDIY2_WARNINGS_PUSH \
VTKDIY2_WARNING_PRAGMAS
#define VTKDIY2_POST_INCLUDE \
VTKDIY2_WARNINGS_POP
#endif