| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkWin32Header.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:49 $ |
| 7 |
|
Version: $Revision: 1.4 $ |
| 8 |
|
|
| 9 |
|
Copyright (c) Insight Software Consortium. All rights reserved. |
| 10 |
|
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. |
| 11 |
|
|
| 12 |
|
Portions of this code are covered under the VTK copyright. |
| 13 |
|
See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details. |
| 14 |
|
|
| 15 |
|
This software is distributed WITHOUT ANY WARRANTY; without even |
| 16 |
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 17 |
IND |
*****PURPOSE. See the above copyright notices for more information. |
| 18 |
|
|
| 19 |
NMS |
=========================================================================*/ |
| 20 |
DEF |
#ifndef __itkWIN32Header_h |
| 21 |
DEF |
#define __itkWIN32Header_h |
| 22 |
|
|
| 23 |
|
#include "itkConfigure.h" |
| 24 |
|
|
| 25 |
|
// add in the Windows variants |
| 26 |
|
|
| 27 |
|
#if defined(__CYGWIN__) |
| 28 |
|
#ifndef WIN32 |
| 29 |
|
#define WIN32 1 |
| 30 |
|
#endif |
| 31 |
|
#ifndef _WIN32 |
| 32 |
|
#define _WIN32 1 |
| 33 |
|
#endif |
| 34 |
|
#endif |
| 35 |
|
|
| 36 |
|
/** Disable some common warnings in MS VC++ */ |
| 37 |
|
#if defined(_MSC_VER) |
| 38 |
|
|
| 39 |
|
// 'conversion' conversion from 'type1' to 'type2', possible loss of data |
| 40 |
|
#pragma warning ( disable : 4244 ) |
| 41 |
|
|
| 42 |
|
// 'identifier' : truncation from 'type1' to 'type2' |
| 43 |
|
#pragma warning ( disable : 4305 ) |
| 44 |
|
|
| 45 |
|
// 'conversion' : truncation of constant value |
| 46 |
|
#pragma warning ( disable : 4309 ) |
| 47 |
|
|
| 48 |
|
// decorated name length exceeded, name was truncated |
| 49 |
|
#pragma warning ( disable : 4503 ) |
| 50 |
|
|
| 51 |
|
// 'identifier' : identifier was truncated to 'number' characters in the |
| 52 |
|
// debug information |
| 53 |
|
#pragma warning ( disable : 4786 ) |
| 54 |
|
|
| 55 |
|
// 'type' : forcing value to bool 'true' or 'false' (performance warning) |
| 56 |
|
#pragma warning ( disable : 4800 ) |
| 57 |
|
|
| 58 |
|
// 'identifier' : class 'type' needs to have dll-interface to be used by |
| 59 |
|
// clients of class 'type2' |
| 60 |
|
#pragma warning ( disable : 4251 ) |
| 61 |
|
|
| 62 |
|
|
| 63 |
|
// non dll-interface class 'type' used as base for dll-interface class 'type2' |
| 64 |
|
#pragma warning ( disable : 4275 ) |
| 65 |
|
|
| 66 |
|
// C++ exception specification ignored except to indicate a |
| 67 |
|
// function is not __declspec(nothrow) |
| 68 |
|
#pragma warning ( disable : 4290 ) |
| 69 |
|
|
| 70 |
|
// 'type' : inconsistent dll linkage. dllexport assumed. |
| 71 |
|
#pragma warning ( disable : 4273 ) |
| 72 |
|
|
| 73 |
|
|
| 74 |
|
// typename keyword in default template arguments is not accepted by |
| 75 |
|
// MSVC. This macro should only be used in such places. |
| 76 |
|
# if !defined(CABLE_CONFIGURATION) && (_MSC_VER < 1310) |
| 77 |
|
# define ITK_TYPENAME |
| 78 |
|
# else |
| 79 |
|
# define ITK_TYPENAME typename |
| 80 |
|
# endif |
| 81 |
|
#else |
| 82 |
|
# define ITK_TYPENAME typename |
| 83 |
|
#endif |
| 84 |
|
|
| 85 |
|
// ITK_EXPORT can not be used |
| 86 |
|
#define ITK_EXPORT |
| 87 |
|
|
| 88 |
|
#if (defined(_WIN32) || defined(WIN32)) && !defined(ITKSTATIC) |
| 89 |
|
# ifdef ITKCommon_EXPORTS |
| 90 |
|
# define ITKCommon_EXPORT __declspec(dllexport) |
| 91 |
|
# else |
| 92 |
|
# define ITKCommon_EXPORT __declspec(dllimport) |
| 93 |
|
# endif /* ITKCommon_EXPORT */ |
| 94 |
|
#else |
| 95 |
|
/* unix needs nothing */ |
| 96 |
|
#define ITKCommon_EXPORT |
| 97 |
|
#endif |
| 98 |
|
|
| 99 |
|
|
| 100 |
|
#endif |
| 101 |
|
|