diff options
Diffstat (limited to 'XcodeConfig/subconfig')
-rw-r--r-- | XcodeConfig/subconfig/Debug.xcconfig | 12 | ||||
-rw-r--r-- | XcodeConfig/subconfig/GTMMerge.xcconfig | 35 | ||||
-rw-r--r-- | XcodeConfig/subconfig/General.xcconfig | 103 | ||||
-rw-r--r-- | XcodeConfig/subconfig/LeopardOrLater.xcconfig | 4 | ||||
-rw-r--r-- | XcodeConfig/subconfig/Release.xcconfig | 11 | ||||
-rw-r--r-- | XcodeConfig/subconfig/SnowLeopardOrLater.xcconfig | 26 | ||||
-rw-r--r-- | XcodeConfig/subconfig/iPhone20.xcconfig | 3 | ||||
-rw-r--r-- | XcodeConfig/subconfig/iPhone21.xcconfig | 3 |
8 files changed, 178 insertions, 19 deletions
diff --git a/XcodeConfig/subconfig/Debug.xcconfig b/XcodeConfig/subconfig/Debug.xcconfig index a6290c3..d8fbd1c 100644 --- a/XcodeConfig/subconfig/Debug.xcconfig +++ b/XcodeConfig/subconfig/Debug.xcconfig @@ -30,8 +30,14 @@ DEAD_CODE_STRIPPING = NO // Debug symbols should be on obviously GCC_GENERATE_DEBUGGING_SYMBOLS = YES -// Define the DEBUG macro in all debug builds -OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 +// Turn off warnings about uninitialized autos +// can only be done when GCC_OPTIMIZATION_LEVEL is actually optimizing +GCC_WARN_UNINITIALIZED_AUTOS = NO // Turns on special C++ STL checks to "encourage" good STL use -GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS +GTM_CONFIGURATION_GCC_PREPROCESSOR_DEFINITIONS = _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS DEBUG=1 + +// Turns on stack protection on debug builds for Leopard and above +GTM_CONFIGURATION_OTHER_CFLAGS = -fstack-protector -fstack-protector-all +// Stack protection doesn't exist on Tiger +GTM_CONFIGURATION_OTHER_CFLAGS[sdk=macosx10.4*] = diff --git a/XcodeConfig/subconfig/GTMMerge.xcconfig b/XcodeConfig/subconfig/GTMMerge.xcconfig new file mode 100644 index 0000000..33d3e70 --- /dev/null +++ b/XcodeConfig/subconfig/GTMMerge.xcconfig @@ -0,0 +1,35 @@ +// +// GTMMerge.xcconfig +// +// Xcode configuration file that merges other xcconfig settings. +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +// Xcode doesn't allow you to "inherit" settings with includes so you always +// end up overriding settings accidentally. To avoid this, we instead +// allow you to define settings at different levels +// (GENERAL, PLATFORM (iPhone/Mac), CONFIGURATION (Release/Debug) and we merge +// those together here. +// We DO NOT inherit OTHER_CPLUSPLUSFLAGS because OTHER_CPLUSPLUSFLAGS by default +// takes on OTHER_CFLAGS settings, and we don't want those applied to our +// C++ files. OTHER_CFLAGS is the only way to set C specific settings on our +// C files that we don't want to have applied to our C++ files such as +// -Wold-style-definition +WARNING_CFLAGS = $(inherited) $(GTM_GENERAL_WARNING_CFLAGS) $(GTM_PLATFORM_WARNING_CFLAGS) $(GTM_CONFIGURATION_WARNING_CFLAGS) +OTHER_CFLAGS = $(inherited) $(GTM_GENERAL_OTHER_CFLAGS) $(GTM_PLATFORM_OTHER_CFLAGS) $(GTM_CONFIGURATION_OTHER_CFLAGS) +OTHER_CPLUSPLUSFLAGS = $(GTM_GENERAL_OTHER_CPLUSPLUSFLAGS) $(GTM_PLATFORM_OTHER_CPLUSPLUSFLAGS) $(GTM_CONFIGURATION_OTHER_CPLUSPLUSFLAGS) +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) $(GTM_GENERAL_GCC_PREPROCESSOR_DEFINITIONS) $(GTM_PLATFORM_GCC_PREPROCESSOR_DEFINITIONS) $(GTM_CONFIGURATION_GCC_PREPROCESSOR_DEFINITIONS) +OTHER_LDFLAGS = $(inherited) $(GTM_GENERAL_OTHER_LDFLAGS) $(GTM_PLATFORM_OTHER_LDFLAGS) $(GTM_CONFIGURATION_OTHER_LDFLAGS) diff --git a/XcodeConfig/subconfig/General.xcconfig b/XcodeConfig/subconfig/General.xcconfig index 114b718..89304b9 100644 --- a/XcodeConfig/subconfig/General.xcconfig +++ b/XcodeConfig/subconfig/General.xcconfig @@ -27,10 +27,18 @@ // for Mac OS developement, the values are: // SDK_NAME macosx10.4 // SDK_NAME macosx10.5 +// SDK_NAME macosx10.6 -// Build for PPC and Intel (Leopard gets 64bit also) +// Build for PPC and Intel (Leopard/SnowLeopard gets 64 bit also) +// Note that you can't build 10.5 with using SenTestingKit on ppc64 with +// SnowLeopard XCode because it doesn't ship with a ppc64 version of +// SenTestingKit. For this reason we are NOT building/testing GTM +// with ppc64 at this time. We override the 10.5 setting in the project +// file to turn it off. ARCHS[sdk=macosx10.4*] = i386 ppc ARCHS[sdk=macosx10.5*] = i386 x86_64 ppc ppc64 +ARCHS[sdk=macosx10.6*] = i386 x86_64 ppc + // Build for arm for iPhone or Intel for the iPhone Simulator ARCHS[sdk=iphoneos*] = armv6 ARCHS[sdk=iphonesimulator*] = i386 @@ -44,9 +52,6 @@ ZERO_LINK = NO // Prebinding considered unhelpful in 10.3 and later PREBINDING = NO -// Strictest warning policy -WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof - // Work around Xcode bugs by using external strip. See: // http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html SEPARATE_STRIP = YES @@ -63,8 +68,94 @@ ALWAYS_SEARCH_USER_PATHS = NO // Turn on position dependent code for most cases (overridden where appropriate) GCC_DYNAMIC_NO_PIC = YES +// For ObjC++ we want C++ cdtors called +GCC_OBJC_CALL_CXX_CDTORS = YES + +// Use Obj-C fast dispatch +GCC_FAST_OBJC_DISPATCH = YES + // Warn on implicit data conversions in 64bit builds GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64*] = YES -// Use Obj-C fast dispatch (configs don't support 10.2 where you don't want it) -GCC_FAST_OBJC_DISPATCH = YES +// Strictest warning policy that we can do +// Options intentionally turned off +// http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +// -Wsystem-headers - since we can't fix them we are going to assume they're ok +// -Wtraditional - we are compiling with c99, so we don't care about trad +// -Wdeclaration-after-statement - we are compiling with c99 which allows this +// -Wpadded - lots of structures will get padded, so although this warning may +// be useful to show us badly padded structures, it causes to many +// warnings to be on generally. +// -Wunreachable-code - several macros use the do {} while (0) which always +// flags this. e.g. all the ST... macros for unittesting +// -Wredundant-decls - we sometimes use redundant decls to add an attribute +// to a function/method (i.e. +// -Waggregate-return - NSPoint, NSRect etc are often returned as aggregates +// -Wshorten-64-to-32 - this is defined in the 64 bit build settings +// -Wcast-qual - Would love to turn this on, but causes issues when converting +// CFTypes to NSTypes and also has issues with some external +// libraries (notably zlib) +// -Wundef - we conditionalize on TARGET_OS_IPHONE which is only defined +// in the iPhoneSDK making us unable to turn this warning on. +// -Wstrict-prototypes - breaks the GTM_METHOD_CHECK macro +// -Wcast-align - causes a whole pile of problems buildng with iPhoneSDK + +// Objective C warnings +// http://gcc.gnu.org/onlinedocs/gcc/Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html +// -Wassign-intercept - this really is more informational than a warning. +// -Wselector - the system headers define lots of methods with the same selector +// rendering this mostly useless to us +// -Wstrict-selector-match - the system headers define lots of methods with the +// same selector rendering this mostly useless to us +// Not being used currently because of Radar 5978978 +// GTM_GENERAL_WARNING_OBJC_ONLY_FLAGS=-Wundeclared-selector + +// C Only Warnings +GTM_GENERAL_OTHER_CFLAGS = -Wdiv-by-zero -Wbad-function-cast -Wnested-externs -Wold-style-definition + +// C++ Only Warnings +GTM_GENERAL_OTHER_CPLUSPLUSFLAGS = -Wabi -Wctor-dtor-privacy -Wstrict-null-sentinel -Wsign-promo +GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES +GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES +GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES +GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES + +// General C/C++/ObjC/ObjC++ warnings +// These are generally ordered in easiest to hardest to support. +// If you are transitioning, you can turn on the levels one level at a time +// in your project file by editing GTM_GENERAL_WARNING_CFLAGS and only +// including the warning levels that you currently are compiling against. +// GTM should always compile with full warnings. +GTM_GENERAL_WARNING_CFLAGS1 = -Wall -Wendif-labels -Winvalid-pch -Wformat=2 -Wmissing-format-attribute -Wwrite-strings -Wstack-protector -Wstrict-aliasing=2 +GTM_GENERAL_WARNING_CFLAGS2 = -Wpacked -Wmissing-field-initializers +GTM_GENERAL_WARNING_CFLAGS3 = -Wextra -Wno-unused-parameter -Wpointer-arith -Wdisabled-optimization -Wfloat-equal +GTM_GENERAL_WARNING_CFLAGS = $(GTM_GENERAL_WARNING_CFLAGS1) $(GTM_GENERAL_WARNING_CFLAGS2) $(GTM_GENERAL_WARNING_CFLAGS3) + +// GCC_WARN_UNINITIALIZED_AUTOS is defined in the release/debug xcconfigs. +GCC_WARN_CHECK_SWITCH_STATEMENTS = YES +GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES +GCC_WARN_ABOUT_MISSING_NEWLINE = YES +GCC_TREAT_WARNINGS_AS_ERRORS = YES +GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES +GCC_WARN_ABOUT_RETURN_TYPE = YES +GCC_WARN_MISSING_PARENTHESES = YES +GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES +GCC_WARN_SIGN_COMPARE = YES +GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES +GCC_WARN_UNKNOWN_PRAGMAS = YES +GCC_WARN_UNUSED_LABEL = YES +GCC_WARN_UNUSED_FUNCTION = YES +GCC_WARN_UNUSED_VALUE = YES +GCC_WARN_UNUSED_VARIABLE = YES +GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES +GCC_WARN_SHADOW = YES + +GCC_WARN_PEDANTIC = NO +GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO +GCC_WARN_PROTOTYPE_CONVERSION = NO +GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = NO +GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = NO +GCC_WARN_UNUSED_PARAMETER = NO +// Use of Gestalt requires 4 char constants (amongst other things) +GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO + diff --git a/XcodeConfig/subconfig/LeopardOrLater.xcconfig b/XcodeConfig/subconfig/LeopardOrLater.xcconfig index fa4dfce..c0f75bc 100644 --- a/XcodeConfig/subconfig/LeopardOrLater.xcconfig +++ b/XcodeConfig/subconfig/LeopardOrLater.xcconfig @@ -1,8 +1,8 @@ // // LeopardOrLater.xcconfig // -// Xcode configuration file for projects targeting 10.4 Tiger or later. These -// settings produce a Universal binary compatible with 10.4 for PPC and Intel. +// Xcode configuration file for projects targeting 10.5 Leopard or later. These +// settings produce a Universal binary compatible with 10.5 for PPC and Intel. // // Copyright 2006-2008 Google Inc. // diff --git a/XcodeConfig/subconfig/Release.xcconfig b/XcodeConfig/subconfig/Release.xcconfig index 74df258..4c5ad8a 100644 --- a/XcodeConfig/subconfig/Release.xcconfig +++ b/XcodeConfig/subconfig/Release.xcconfig @@ -30,9 +30,16 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = NO // Dead code strip does not affect ObjC code but can help for C DEAD_CODE_STRIPPING = YES -// NDEBUG is used by things like assert.h, so define it for general compat. // ASSERT going away in release tends to create unused vars. -OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable +// init-self can only be turned on when optimizations are on +GTM_CONFIGURATION_WARNING_CFLAGS = -Wno-unused-variable -Winit-self -Wno-extra + +// NDEBUG is used by things like assert.h, so define it for general compat. +GTM_CONFIGURATION_GCC_PREPROCESSOR_DEFINITIONS = NDEBUG=1 + +// Give us warnings about uninitialized autos +// can only be done when GCC_OPTIMIZATION_LEVEL is actually optimizing +GCC_WARN_UNINITIALIZED_AUTOS = YES // When we strip we want to strip all symbols in release, but save externals. STRIP_STYLE = all diff --git a/XcodeConfig/subconfig/SnowLeopardOrLater.xcconfig b/XcodeConfig/subconfig/SnowLeopardOrLater.xcconfig new file mode 100644 index 0000000..0a7475e --- /dev/null +++ b/XcodeConfig/subconfig/SnowLeopardOrLater.xcconfig @@ -0,0 +1,26 @@ +// +// SnowLeopardOrLater.xcconfig +// +// Xcode configuration file for projects targeting 10.6 SnowLeopard or later. +// These settings produce a Universal binary compatible with 10.6 for +// PPC and Intel. +// +// Copyright 2008 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy +// of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. +// + +// Default SDK and minimum OS version is 10.6 +SDKROOT = ${DEVELOPER_SDK_DIR}/MacOSX10.6.sdk +MACOSX_DEPLOYMENT_TARGET = 10.6 +GCC_VERSION = 4.0 diff --git a/XcodeConfig/subconfig/iPhone20.xcconfig b/XcodeConfig/subconfig/iPhone20.xcconfig index fea781b..2509ba8 100644 --- a/XcodeConfig/subconfig/iPhone20.xcconfig +++ b/XcodeConfig/subconfig/iPhone20.xcconfig @@ -17,9 +17,6 @@ // License for the specific language governing permissions and limitations under // the License. -// Code signing. Should be overridden if releasing -CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer - // Default SDK and minimum OS version is the iphone SDK. SDKROOT = iphoneos2.0 MACOSX_DEPLOYMENT_TARGET = 10.5 diff --git a/XcodeConfig/subconfig/iPhone21.xcconfig b/XcodeConfig/subconfig/iPhone21.xcconfig index 6265000..e543ce5 100644 --- a/XcodeConfig/subconfig/iPhone21.xcconfig +++ b/XcodeConfig/subconfig/iPhone21.xcconfig @@ -17,9 +17,6 @@ // License for the specific language governing permissions and limitations under // the License. -// Code signing. Should be overridden if releasing -CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer - // Default SDK and minimum OS version is the iphone SDK. SDKROOT = iphoneos2.1 MACOSX_DEPLOYMENT_TARGET = 10.5 |