/core/externals/google-toolbox-for-mac/XcodeConfig/subconfig/General.xcconfig

http://macfuse.googlecode.com/ · Xcode Config · 172 lines · 53 code · 23 blank · 96 comment · 0 complexity · 4a6ac4ff3b3f36d7143d2e6e8a5fb16d MD5 · raw file

  1. //
  2. // General.xcconfig
  3. //
  4. // Xcode configuration file for general build settings applicable to all
  5. // projects and targets.
  6. //
  7. // Copyright 2011 Google Inc.
  8. //
  9. // Licensed under the Apache License, Version 2.0 (the "License"); you may not
  10. // use this file except in compliance with the License. You may obtain a copy
  11. // of the License at
  12. //
  13. // http://www.apache.org/licenses/LICENSE-2.0
  14. //
  15. // Unless required by applicable law or agreed to in writing, software
  16. // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  17. // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  18. // License for the specific language governing permissions and limitations under
  19. // the License.
  20. //
  21. // NOTE: as of Xcode 3.1, for iPhone development, the two SDKs you can match are:
  22. // SDK_NAME iphoneos2.0
  23. // SDK_NAME iphoneos2.1
  24. // SDK_NAME iphonesimulator2.0
  25. // SDK_NAME iphonesimulator2.1
  26. // for Mac OS developement, the values are:
  27. // SDK_NAME macosx10.4
  28. // SDK_NAME macosx10.5
  29. // SDK_NAME macosx10.6
  30. // Pick up the Xcode default settings for ARCHS. Keep the historical behavior
  31. // of providing overrides for the older SDKs so existing apps are less likely
  32. // to break.
  33. ARCHS[sdk=macosx*] = $(ARCHS_STANDARD_32_64_BIT)
  34. ARCHS[sdk=macosx10.4*] = i386 ppc
  35. ARCHS[sdk=macosx10.5*] = i386 x86_64 ppc ppc64
  36. ARCHS[sdk=macosx10.6*] = i386 x86_64
  37. // Build for arm for iPhone or Intel for the iPhone Simulator
  38. ARCHS[sdk=iphoneos*] = armv6
  39. ARCHS[sdk=iphonesimulator*] = i386
  40. // Build only the active architecture on iphone device targets
  41. ONLY_ACTIVE_ARCH[sdk=iphoneos*] = YES
  42. // We want our pngs compressed when they are copied
  43. COMPRESS_PNG_FILES = YES
  44. // Zerolink prevents link warnings so turn it off
  45. ZERO_LINK = NO
  46. // Prebinding considered unhelpful in 10.3 and later
  47. PREBINDING = NO
  48. // Work around Xcode bugs by using external strip. See:
  49. // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html
  50. SEPARATE_STRIP = YES
  51. // Do not strip any binaries during copy as it will corrupt code signatures.
  52. // This wont't affect iOS (since they can't have external executables or
  53. // frameworks) and prevents corruption on Mac. Xcode 4 warns but does not
  54. // fix this case:
  55. // http://stackoverflow.com/questions/5494920/xcode-4-archive-warning-to-skip-copy-phase
  56. COPY_PHASE_STRIP = NO
  57. // Force C99 dialect
  58. GCC_C_LANGUAGE_STANDARD = c99
  59. // Obj-C exceptions are needed for @synchronized(self)
  60. GCC_ENABLE_OBJC_EXCEPTIONS = YES
  61. // not sure why apple defaults this on, but it's pretty risky
  62. ALWAYS_SEARCH_USER_PATHS = NO
  63. // Turn on position dependent code for most cases (overridden where appropriate)
  64. GCC_DYNAMIC_NO_PIC = YES
  65. // For ObjC++ we want C++ cdtors called
  66. GCC_OBJC_CALL_CXX_CDTORS = YES
  67. // Use Obj-C fast dispatch
  68. GCC_FAST_OBJC_DISPATCH = YES
  69. // Warn on implicit data conversions in 64bit builds
  70. GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64] = YES
  71. // Strictest warning policy that we can do
  72. // Options intentionally turned off
  73. // http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
  74. // -Wsystem-headers - since we can't fix them we are going to assume they're ok
  75. // -Wtraditional - we are compiling with c99, so we don't care about trad
  76. // -Wdeclaration-after-statement - we are compiling with c99 which allows this
  77. // -Wpadded - lots of structures will get padded, so although this warning may
  78. // be useful to show us badly padded structures, it causes to many
  79. // warnings to be on generally.
  80. // -Wunreachable-code - several macros use the do {} while (0) which always
  81. // flags this. e.g. all the ST... macros for unittesting
  82. // -Wredundant-decls - we sometimes use redundant decls to add an attribute
  83. // to a function/method (i.e.
  84. // -Waggregate-return - NSPoint, NSRect etc are often returned as aggregates
  85. // -Wshorten-64-to-32 - this is defined in the 64 bit build settings
  86. // -Wcast-qual - Would love to turn this on, but causes issues when converting
  87. // CFTypes to NSTypes and also has issues with some external
  88. // libraries (notably zlib)
  89. // -Wundef - we conditionalize on TARGET_OS_IPHONE which is only defined
  90. // in the iPhoneSDK making us unable to turn this warning on.
  91. // -Wstrict-prototypes - breaks the GTM_METHOD_CHECK macro
  92. // -Wcast-align - causes a whole pile of problems buildng with iPhoneSDK
  93. // Objective C warnings
  94. // http://gcc.gnu.org/onlinedocs/gcc/Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html
  95. // -Wassign-intercept - this really is more informational than a warning.
  96. // -Wselector - the system headers define lots of methods with the same selector
  97. // rendering this mostly useless to us
  98. // -Wstrict-selector-match - the system headers define lots of methods with the
  99. // same selector rendering this mostly useless to us
  100. // C Only Warnings
  101. GTM_GENERAL_OTHER_CFLAGS = -Wdiv-by-zero -Wbad-function-cast -Wnested-externs -Wold-style-definition
  102. // C++ Only Warnings
  103. GTM_GENERAL_OTHER_CPLUSPLUSFLAGS = -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel -Wsign-promo
  104. GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES
  105. GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
  106. GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
  107. GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
  108. // General C/C++/ObjC/ObjC++ warnings
  109. // These are generally ordered in easiest to hardest to support.
  110. // If you are transitioning, you can turn on the levels one level at a time
  111. // in your project file by editing GTM_GENERAL_WARNING_CFLAGS and only
  112. // including the warning levels that you currently are compiling against.
  113. // GTM should always compile with full warnings.
  114. GTM_GENERAL_WARNING_CFLAGS1 = -Wall -Wendif-labels -Winvalid-pch -Wformat=2 -Wmissing-format-attribute -Wwrite-strings -Wstack-protector -Wstrict-aliasing=2
  115. GTM_GENERAL_WARNING_CFLAGS2 = -Wpacked -Wmissing-field-initializers
  116. GTM_EXTRA_WARNING_OVERRIDE_CFLAGS = -Wno-unused-parameter -Wno-sign-compare
  117. GTM_GENERAL_WARNING_CFLAGS3 = -Wextra $(GTM_EXTRA_WARNING_OVERRIDE_CFLAGS) -Wpointer-arith -Wdisabled-optimization -Wfloat-equal
  118. GTM_GENERAL_WARNING_CFLAGS = $(GTM_GENERAL_WARNING_CFLAGS1) $(GTM_GENERAL_WARNING_CFLAGS2) $(GTM_GENERAL_WARNING_CFLAGS3)
  119. // GCC_WARN_UNINITIALIZED_AUTOS is defined in the release/debug xcconfigs.
  120. GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
  121. GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES
  122. GCC_WARN_ABOUT_MISSING_NEWLINE = YES
  123. GCC_TREAT_WARNINGS_AS_ERRORS = YES
  124. GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
  125. GCC_WARN_ABOUT_RETURN_TYPE = YES
  126. GCC_WARN_MISSING_PARENTHESES = YES
  127. GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES
  128. GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
  129. GCC_WARN_UNKNOWN_PRAGMAS = YES
  130. GCC_WARN_UNUSED_LABEL = YES
  131. GCC_WARN_UNUSED_FUNCTION = YES
  132. GCC_WARN_UNUSED_VALUE = YES
  133. GCC_WARN_UNUSED_VARIABLE = YES
  134. GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
  135. GCC_WARN_UNDECLARED_SELECTOR = YES
  136. // We don't turn on shadow and sign comparisons because too many 3rd party
  137. // libaries don't compile with them turned on (sign compare rarely catches
  138. // errors, but shadow is very useful).
  139. // NOTE: sign compare is also controlled by -Wextra, we we override it above.
  140. // GCC_WARN_SHADOW = YES
  141. // GCC_WARN_SIGN_COMPARE = YES
  142. GCC_WARN_PEDANTIC = NO
  143. GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO
  144. GCC_WARN_PROTOTYPE_CONVERSION = NO
  145. GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO
  146. GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = NO
  147. GCC_WARN_UNUSED_PARAMETER = NO
  148. // Use of Gestalt requires 4 char constants (amongst other things)
  149. GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO