aboutsummaryrefslogtreecommitdiff
path: root/XcodeConfig
diff options
context:
space:
mode:
authorGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-10-22 19:16:19 +0000
committerGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2008-10-22 19:16:19 +0000
commit11938e47355bfbf3b81f1ff5b15f1222b83d4f47 (patch)
tree3794c78559472e4b2efe5eabc0e094d7c14a9743 /XcodeConfig
parent90eba8f973c0b77f36dc7084163ff0d43675a1a8 (diff)
- GTM_INLINE will make sure a function gets inlined, and provides a consistent
way for all GTM code to do it. - Added GTMDebugThreadValidation to allow you to enforce the fact that your code must run in the main thread in DEBUG builds. - Updated some internals of the iPhone unittesting so it doesn't double print the test descriptions, file names, or lines numbers of a test failure line. Also includes the test names in the error output. - Changed the xcconfigs so that know it's easier to set different settings at the different levels and not accidentally overwrite settings set at lower levels in the "settings collapse". Also tightened up warnings significantly. - Changed how gtm_unitTestExposedBindingsTestValues works. If you have an implementation of gtm_unitTestExposedBindingsTestValues in your own code you will need to update to the new way of calling. See implementations in GTMNSObject+BindingUnitTesting.m for details. - Added support for grabbing the build number for a particular OS in GTMSystemVersion and easily comparing it to known build numbers, and switched some types from in GTMSystemVersion from "int" to SInt32 to make 64 bit work better. - Added support for SnowLeopard (10A96). We build cleanly with the 10.6 SDKs and all radar checks were updated accordingly. Build All script was also updated to build on SnowLeopard if you have the SDK available. - Turned off building ppc64 GTM because the SnowLeopard SDK currently doesn't have ppc64 support, so SenTestCase isn't defined. This makes it impossible to build the ppc64 10.5 config on SnowLeopard. We have left the setting in the xcconfig for those of you who need it, but have disabled it in the GTM project settings. - Turned on stack smashing protection on the debug builds for all Leopard and above. - Added ability to easily do leak checking by defining the GTM_ENABLE_LEAKS environment variable. It isn't on by default because several of Apple's frameworks leak. You can work around these false positives by using the GTM_LEAKS_SYMBOLS_TO_IGNORE environment variable. Also if you turn on leaks make sure to turn off zombies by defining the GTM_DISABLE_ZOMBIES variable, otherwise every memory allocation you do will look like a leak.
Diffstat (limited to 'XcodeConfig')
-rw-r--r--XcodeConfig/Project/DebugLeopardOrLater.xcconfig2
-rw-r--r--XcodeConfig/Project/DebugSnowLeopardOrLater.xcconfig37
-rw-r--r--XcodeConfig/Project/DebugTigerOrLater.xcconfig2
-rw-r--r--XcodeConfig/Project/DebugiPhone20.xcconfig3
-rw-r--r--XcodeConfig/Project/DebugiPhone21.xcconfig3
-rw-r--r--XcodeConfig/Project/ReleaseLeopardOrLater.xcconfig3
-rw-r--r--XcodeConfig/Project/ReleaseSnowLeopardOrLater.xcconfig37
-rw-r--r--XcodeConfig/Project/ReleaseTigerOrLater.xcconfig3
-rw-r--r--XcodeConfig/Project/ReleaseiPhone20.xcconfig3
-rw-r--r--XcodeConfig/Project/ReleaseiPhone21.xcconfig3
-rw-r--r--XcodeConfig/subconfig/Debug.xcconfig12
-rw-r--r--XcodeConfig/subconfig/GTMMerge.xcconfig35
-rw-r--r--XcodeConfig/subconfig/General.xcconfig103
-rw-r--r--XcodeConfig/subconfig/LeopardOrLater.xcconfig4
-rw-r--r--XcodeConfig/subconfig/Release.xcconfig11
-rw-r--r--XcodeConfig/subconfig/SnowLeopardOrLater.xcconfig26
-rw-r--r--XcodeConfig/subconfig/iPhone20.xcconfig3
-rw-r--r--XcodeConfig/subconfig/iPhone21.xcconfig3
-rw-r--r--XcodeConfig/xcconfigs-readme.txt25
19 files changed, 297 insertions, 21 deletions
diff --git a/XcodeConfig/Project/DebugLeopardOrLater.xcconfig b/XcodeConfig/Project/DebugLeopardOrLater.xcconfig
index 5bbd4a2..b00a6cc 100644
--- a/XcodeConfig/Project/DebugLeopardOrLater.xcconfig
+++ b/XcodeConfig/Project/DebugLeopardOrLater.xcconfig
@@ -33,3 +33,5 @@
// Debug settings
#include "../subconfig/Debug.xcconfig"
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/DebugSnowLeopardOrLater.xcconfig b/XcodeConfig/Project/DebugSnowLeopardOrLater.xcconfig
new file mode 100644
index 0000000..a090412
--- /dev/null
+++ b/XcodeConfig/Project/DebugSnowLeopardOrLater.xcconfig
@@ -0,0 +1,37 @@
+//
+// DebugSnowLeopardOrLater.xcconfig
+//
+// Xcode configuration file for building a Debug configuration of a project
+// on SnowLeopard or later.
+//
+// This is a _Configuration_ Xcode config file for use in the "Based on" popup
+// of the project configuration editor. Do _not_ use this as the config base
+// and individual Xcode target, there are other configuration files for that
+// purpose.
+//
+// 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.
+//
+
+// Pull in the general settings
+#include "../subconfig/General.xcconfig"
+
+// SnowLeopard or later
+#include "../subconfig/SnowLeopardOrLater.xcconfig"
+
+// Debug settings
+#include "../subconfig/Debug.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/DebugTigerOrLater.xcconfig b/XcodeConfig/Project/DebugTigerOrLater.xcconfig
index b8893ce..34b7b1c 100644
--- a/XcodeConfig/Project/DebugTigerOrLater.xcconfig
+++ b/XcodeConfig/Project/DebugTigerOrLater.xcconfig
@@ -33,3 +33,5 @@
// Debug settings
#include "../subconfig/Debug.xcconfig"
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/DebugiPhone20.xcconfig b/XcodeConfig/Project/DebugiPhone20.xcconfig
index 1f08ee4..7424704 100644
--- a/XcodeConfig/Project/DebugiPhone20.xcconfig
+++ b/XcodeConfig/Project/DebugiPhone20.xcconfig
@@ -32,3 +32,6 @@
// Release settings
#include "../subconfig/Debug.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/DebugiPhone21.xcconfig b/XcodeConfig/Project/DebugiPhone21.xcconfig
index b718cfa..18c923a 100644
--- a/XcodeConfig/Project/DebugiPhone21.xcconfig
+++ b/XcodeConfig/Project/DebugiPhone21.xcconfig
@@ -32,3 +32,6 @@
// Release settings
#include "../subconfig/Debug.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/ReleaseLeopardOrLater.xcconfig b/XcodeConfig/Project/ReleaseLeopardOrLater.xcconfig
index f62b287..31ac835 100644
--- a/XcodeConfig/Project/ReleaseLeopardOrLater.xcconfig
+++ b/XcodeConfig/Project/ReleaseLeopardOrLater.xcconfig
@@ -32,3 +32,6 @@
// Release settings
#include "../subconfig/Release.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/ReleaseSnowLeopardOrLater.xcconfig b/XcodeConfig/Project/ReleaseSnowLeopardOrLater.xcconfig
new file mode 100644
index 0000000..0d24069
--- /dev/null
+++ b/XcodeConfig/Project/ReleaseSnowLeopardOrLater.xcconfig
@@ -0,0 +1,37 @@
+//
+// ReleaseSnowLeopardOrLater.xcconfig
+//
+// Xcode configuration file for building a Release configuration of a project
+// on SnowLeopard or later.
+//
+// This is a _Configuration_ Xcode config file for use in the "Based on" popup
+// of the project configuration editor. Do _not_ use this as the config base
+// and individual Xcode target, there are other configuration files for that
+// purpose.
+//
+// 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.
+//
+
+// Pull in the general settings
+#include "../subconfig/General.xcconfig"
+
+// SnowLeopard or later
+#include "../subconfig/SnowLeopardOrLater.xcconfig"
+
+// Release settings
+#include "../subconfig/Release.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/ReleaseTigerOrLater.xcconfig b/XcodeConfig/Project/ReleaseTigerOrLater.xcconfig
index d604d88..9301912 100644
--- a/XcodeConfig/Project/ReleaseTigerOrLater.xcconfig
+++ b/XcodeConfig/Project/ReleaseTigerOrLater.xcconfig
@@ -32,3 +32,6 @@
// Release settings
#include "../subconfig/Release.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/ReleaseiPhone20.xcconfig b/XcodeConfig/Project/ReleaseiPhone20.xcconfig
index 16895c5..8d31ead 100644
--- a/XcodeConfig/Project/ReleaseiPhone20.xcconfig
+++ b/XcodeConfig/Project/ReleaseiPhone20.xcconfig
@@ -32,3 +32,6 @@
// Release settings
#include "../subconfig/Release.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
diff --git a/XcodeConfig/Project/ReleaseiPhone21.xcconfig b/XcodeConfig/Project/ReleaseiPhone21.xcconfig
index 4ea90d6..8a9a0c3 100644
--- a/XcodeConfig/Project/ReleaseiPhone21.xcconfig
+++ b/XcodeConfig/Project/ReleaseiPhone21.xcconfig
@@ -32,3 +32,6 @@
// Release settings
#include "../subconfig/Release.xcconfig"
+
+// Merge settings
+#include "../subconfig/GTMMerge.xcconfig"
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
diff --git a/XcodeConfig/xcconfigs-readme.txt b/XcodeConfig/xcconfigs-readme.txt
index 5a44bb0..87a6dd7 100644
--- a/XcodeConfig/xcconfigs-readme.txt
+++ b/XcodeConfig/xcconfigs-readme.txt
@@ -1,4 +1,4 @@
-Xcode Config is sorta a black art, any time you have a set of rules, you
+Xcode Configs are sort of a black art, any time you have a set of rules, you
quickly hit a few exceptions.
The main goal of using these is as follow:
@@ -6,7 +6,7 @@ The main goal of using these is as follow:
Edit your Project level build settings by removing as much as possible, and
then set the per Configuration settings to one of the project xcode config
files w/in the Project subfolder here. This will batch setup the project to
-build Debug/Release w/ a specific SDK.
+build Debug/Release with a specific SDK.
If you are building a Shared Library, Loadable Bundle (Framework) or UnitTest
you will need to apply a further Xcode Config file at the target level. You do
@@ -30,3 +30,24 @@ support to make mixing SDKs easier.
Remember: When using the configs at any given layer, make sure you set them for
each build configuration you need (not just the active one).
+
+Many of the build settings are more than just yes/no flags and take
+a list of values that you may want to change at different levels.
+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).
+We do this by setting a GTM version of the setting (so for OTHER_CFLAGS it's
+GTM_XXX_OTHER_CFLAGS where xxx is GENERAL, PLATFORM or CONFIGURATION depending
+at what level the flag is set. These are all merged together in the
+GTMMerge.xcconfig. Do not modify the base setting (OTHER_CFLAGS) instead modify
+the GTM one at the level you want it modified.
+
+The major place this may affect you is that we have really tightened down on
+the warnings. To make it easier for you to move your code onto the new
+xcconfig files, we have split the warnings up into three categories, which in
+general you can think of as easy, moderate and extreme. If you run into a lot
+of warnings when you compile, look at changing the GTM_GENERAL_WARNING_CFLAGS
+setting to only include lower levels (eg GTM_GENERAL_WARNING_CFLAGS1) and see
+if that makes it easier on you. Look inside General.xcconfig and search for
+GTM_GENERAL_WARNING_CFLAGS1 for more info.