VTK  9.1.0
vtkCompiler.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCompiler.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
16#ifndef vtkCompiler_h
17#define vtkCompiler_h
18
19/*--------------------------------------------------------------------------*/
20/* Compiler backend */
21/* Be careful modifying this -- order is important. */
22#if defined(_MSC_VER)
23/* MSVC 2015+ can use a clang frontend, so we want to label it only as MSVC
24 * and not MSVC and clang. */
25#define VTK_COMPILER_MSVC
26
27#elif defined(__INTEL_COMPILER)
28/* Intel 14+ on OSX uses a clang frontend, so again we want to label them as
29 * intel only, and not intel and clang. */
30#define VTK_COMPILER_ICC
31
32#elif defined(__PGI)
33/* PGI reports as GNUC as it generates the same ABI, so we need to check for
34 * it before gcc. */
35#define VTK_COMPILER_PGI
36
37#elif defined(__clang__)
38/* Check for clang before GCC, as clang says it is GNUC since it has ABI
39 * compliance and supports many of the same extensions. */
40#define VTK_COMPILER_CLANG
41
42#elif defined(__GNUC__)
43/* Several compilers pretend to be GCC but have minor differences. To
44 * compensate for that, we checked for those compilers first above. */
45#define VTK_COMPILER_GCC
46#define VTK_COMPILER_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
47#endif
48
50#define VTK_USE_EXTERN_TEMPLATE
51
52#endif
53
54// VTK-HeaderTest-Exclude: vtkCompiler.h