VTK
vtkCocoaMacOSXSDKCompatibility.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkCocoaMacOSXSDKCompatibility.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 =========================================================================*/
24 #include <AvailabilityMacros.h>
25 
26 #if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
27  #error VTK requires the Mac OS X 10.5 SDK or later
28 #endif
29 
30 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
31  #error VTK requires a deployment target of Mac OS X 10.5 or later
32 #endif
33 
34 // __has_feature is new in the 10.7 SDK, define it here if it's not yet defined.
35 #ifndef __has_feature
36  #define __has_feature(x) 0
37 #endif
38 
39 // Create handy #defines that indicate the Objective-C memory management model.
40 // Manual Retain Release, Automatic Reference Counting, or Garbage Collection.
41 #if defined(__OBJC_GC__)
42  #define VTK_OBJC_IS_MRR 0
43  #define VTK_OBJC_IS_ARC 0
44  #define VTK_OBJC_IS_GC 1
45 #elif __has_feature(objc_arc)
46  #define VTK_OBJC_IS_MRR 0
47  #define VTK_OBJC_IS_ARC 1
48  #define VTK_OBJC_IS_GC 0
49 #else
50  #define VTK_OBJC_IS_MRR 1
51  #define VTK_OBJC_IS_ARC 0
52  #define VTK_OBJC_IS_GC 0
53 #endif
54 
55 #if __has_feature(objc_arc)
56  #error VTK does not yet support ARC memory management
57 #endif
58 
59 // VTK-HeaderTest-Exclude: vtkCocoaMacOSXSDKCompatibility.h