Permalink
Browse files

Moved most build settings to .xcconfig files

  • Loading branch information...
1 parent 29647a3 commit 91713f9f10b98cf53568af5ed99271789ffdbdd2 @kelan committed Jul 17, 2011
Showing with 135 additions and 30 deletions.
  1. +28 −0 Configs/debug.xcconfig
  2. +89 −0 Configs/release.xcconfig
  3. +18 −30 SPILDemo.xcodeproj/project.pbxproj
View
28 Configs/debug.xcconfig
@@ -0,0 +1,28 @@
+//
+// debug.xcconfig
+//
+// This is mostly based on the Release config, but we override some settings
+//
+
+#include "release.xcconfig"
+
+
+// Architectures
+ARCHS = $(NATIVE_ARCH_ACTUAL)
+ONLY_ACTIVE_ARCH = YES
+
+// Code Generation
+GCC_DYNAMIC_NO_PIC = NO
+GCC_GENERATE_DEBUGGING_SYMBOLS = YES
+GCC_OPTIMIZATION_LEVEL = 0
+
+
+// Deployment
+COPY_PHASE_STRIP = NO
+STRIP_INSTALLED_PRODUCT = NO
+STRIP_STYLE = all
+
+
+// Linking
+DEAD_CODE_STRIPPING = NO
+
View
89 Configs/release.xcconfig
@@ -0,0 +1,89 @@
+//
+// release.xcconfig
+//
+// All the shared build settings go in this file. Then the other .xcconfig files can
+// #import this and override settings as necessary.
+//
+// There shouldn't be anything set at the Project level in the Xcode UI, except:
+// * Info.plist
+// * Product Name
+//
+
+// Architectures
+ARCHS = $(ARCHS_STANDARD_32_64_BIT)
+SDKROOT = macosx // latest Mac OS
+ONLY_ACTIVE_ARCH = NO
+
+
+// Build Options
+DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
+
+
+// Compiler Version
+GCC_VERSION = com.apple.compilers.llvm.clang.1_0
+
+
+// Code Generation
+GCC_DYNAMIC_NO_PIC = YES
+GCC_ENABLE_FIX_AND_CONTINUE = NO
+GCC_GENERATE_DEBUGGING_SYMBOLS = NO
+GCC_OPTIMIZATION_LEVEL = s
+GCC_SYMBOLS_PRIVATE_EXTERN = YES // "Symbols Hidden by Default" in the GUI
+LLVM_LTO = NO
+
+
+// Deployment
+COPY_PHASE_STRIP = YES
+MACOSX_DEPLOYMENT_TARGET = 10.5
+STRIP_INSTALLED_PRODUCT = YES
+
+
+// Language
+GCC_C_LANGUAGE_STANDARD = gnu99
+GCC_PRECOMPILE_PREFIX_HEADER = YES
+OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS)
+
+
+// Preprocessing
+GCC_PREPROCESSOR_DEFINITIONS = NS_BLOCK_ASSERTIONS
+
+
+// Linking
+OTHER_LDFLAGS = -ObjC
+DEAD_CODE_STRIPPING = YES
+STRIP_STYLE = all
+
+
+// Search Paths
+ALWAYS_SEARCH_USER_PATHS = NO
+
+
+// Warnings
+GCC_TREAT_WARNINGS_AS_ERRORS = YES
+// We have to add -Wno-unused-parameter here, because this flag gets added
+// after the specific GCC_WARN_* warnings below, so the -Wall overrides
+// any GCC_WARN_UNUSED_PARAMETER value.
+WARNING_CFLAGS = -Wall -Wextra -Wno-unused-parameter
+
+// Some advice from: http://boredzo.org/blog/archives/2009-11-07/warnings
+GCC_WARN_64_TO_32_BIT_CONVERSION = YES
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
+GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
+GCC_WARN_ABOUT_MISSING_NEWLINE = YES
+GCC_WARN_ABOUT_RETURN_TYPE = YES
+GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
+GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
+GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
+GCC_WARN_MISSING_PARENTHESES = YES
+GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
+GCC_WARN_SHADOW = YES
+GCC_WARN_SIGN_COMPARE = YES
+GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
+GCC_WARN_UNDECLARED_SELECTOR = YES
+GCC_WARN_UNUSED_FUNCTION = YES
+GCC_WARN_UNUSED_LABEL = YES
+GCC_WARN_UNUSED_PARAMETER = NO
+GCC_WARN_UNUSED_VALUE = YES
+GCC_WARN_UNUSED_VARIABLE = YES
+
+
View
48 SPILDemo.xcodeproj/project.pbxproj
@@ -24,6 +24,8 @@
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 35948AF513D2754300982A06 /* debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = debug.xcconfig; path = Configs/debug.xcconfig; sourceTree = "<group>"; };
+ 35948AF613D2754300982A06 /* release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = release.xcconfig; path = Configs/release.xcconfig; sourceTree = "<group>"; };
761A37C30CF949C7006BD459 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = /System/Library/Frameworks/Quartz.framework; sourceTree = "<absolute>"; };
761A37C40CF949C7006BD459 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
7630041C0E0B614B00074CE5 /* SPILDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SPILDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -97,6 +99,7 @@
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
+ 35948AF313D2753100982A06 /* Configs */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
@@ -131,6 +134,15 @@
name = Frameworks;
sourceTree = "<group>";
};
+ 35948AF313D2753100982A06 /* Configs */ = {
+ isa = PBXGroup;
+ children = (
+ 35948AF513D2754300982A06 /* debug.xcconfig */,
+ 35948AF613D2754300982A06 /* release.xcconfig */,
+ );
+ name = Configs;
+ sourceTree = "<group>";
+ };
764F1DB10E235DDC00054919 /* Demo App */ = {
isa = PBXGroup;
children = (
@@ -179,7 +191,11 @@
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SPILDemo" */;
compatibilityVersion = "Xcode 3.0";
+ developmentRegion = English;
hasScannedForEncodings = 1;
+ knownRegions = (
+ en,
+ );
mainGroup = 29B97314FDCFA39411CA2CEA /* CATest */;
projectDirPath = "";
projectRoot = "";
@@ -239,61 +255,33 @@
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = NO;
- GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SPILDemo_Prefix.pch;
- GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = Resources/Info.plist;
- INSTALL_PATH = "$(HOME)/Applications";
- PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
PRODUCT_NAME = SPILDemo;
- WRAPPER_EXTENSION = app;
- ZERO_LINK = YES;
};
name = Debug;
};
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- GCC_ENABLE_OBJC_GC = required;
- GCC_MODEL_TUNING = G5;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SPILDemo_Prefix.pch;
- GCC_TREAT_WARNINGS_AS_ERRORS = YES;
INFOPLIST_FILE = Resources/Info.plist;
- INSTALL_PATH = "$(HOME)/Applications";
- PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES;
PRODUCT_NAME = SPILDemo;
- WRAPPER_EXTENSION = app;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 35948AF513D2754300982A06 /* debug.xcconfig */;
buildSettings = {
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 35948AF613D2754300982A06 /* release.xcconfig */;
buildSettings = {
- ARCHS = (
- ppc,
- i386,
- );
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
};
name = Release;
};

0 comments on commit 91713f9

Please sign in to comment.