Skip to content

Commit

Permalink
xcconfigs
Browse files Browse the repository at this point in the history
move Xcode configuration to xcconfig files, tweak, fix
  • Loading branch information
ttilley committed Dec 29, 2011
1 parent 1381915 commit 0bb6853
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 0 deletions.
82 changes: 82 additions & 0 deletions xcconfig/Common.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// local defines
COMMON_CFLAGS = -pipe
COMMON_GCC_PREPROCESSOR_DEFINITIONS = NS_BUILD_32_LIKE_64 NS_BLOCK_ASSERTIONS


// architectures
ARCHS = $(ARCHS_STANDARD_32_64_BIT)
VALID_ARCHS = i386 x86_64
SDKROOT = macosx
SUPPORTED_PLATFORMS = macosx
ONLY_ACTIVE_ARCH = NO


// build options
DEBUG_INFORMATION_FORMAT = dwarf
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
RUN_CLANG_STATIC_ANALYZER = YES


// deployment
MACOSX_DEPLOYMENT_TARGET = 10.6


// linking
DEAD_CODE_STRIPPING = YES
PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES
LINK_WITH_STANDARD_LIBRARIES = YES


// search paths
FRAMEWORK_SEARCH_PATHS = $(value) $(SYSTEM_LIBRARY_DIR)/Frameworks $(LOCAL_LIBRARY_DIR)/Frameworks


// code generation
GCC_DYNAMIC_NO_PIC = NO
GCC_FAST_OBJC_DISPATCH = YES
GCC_GENERATE_DEBUGGING_SYMBOLS = YES
GCC_STRICT_ALIASING = YES
LLVM_LTO = YES


// language
GCC_C_LANGUAGE_STANDARD = gnu99
OTHER_CFLAGS = $(COMMON_CFLAGS)


// preprocessing
GCC_PREPROCESSOR_DEFINITIONS = $(COMMON_GCC_PREPROCESSOR_DEFINITIONS)


// warnings
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES
GCC_TREAT_WARNINGS_AS_ERRORS = NO
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_MISSING_PARENTHESES = YES
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO
GCC_WARN_SHADOW = YES
GCC_WARN_SIGN_COMPARE = YES
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES
GCC_WARN_UNKNOWN_PRAGMAS = 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
WARNING_CFLAGS = -Wall -Wextra -Wpointer-arith -Wformat=2 -Wfloat-equal -Wstrict-overflow=4 -Wbad-function-cast -Winline -Wconversion -Wstrict-aliasing -Wno-unused-parameter -Wno-arc-performSelector-leaks
19 changes: 19 additions & 0 deletions xcconfig/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "Common.xcconfig"


// deployment
COPY_PHASE_STRIP = NO
STRIP_INSTALLED_PRODUCT = NO


// code generation
GCC_OPTIMIZATION_LEVEL = 0
GCC_GENERATE_DEBUGGING_SYMBOLS = YES


// language
OTHER_CFLAGS = $(COMMON_CFLAGS) -fcatch-undefined-behavior -ftrapv -fverbose-asm


// preprocessing
GCC_PREPROCESSOR_DEFINITIONS = $(COMMON_GCC_PREPROCESSOR_DEFINITIONS) DEBUG DEBUG_$(USER)
23 changes: 23 additions & 0 deletions xcconfig/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "Common.xcconfig"


// build options
VALIDATE_PRODUCT = YES


// code signing
CODE_SIGN_IDENTITY = 3rd Party Mac Developer Application: Travis Tilley


// deployment
COPY_PHASE_STRIP = YES
STRIP_INSTALLED_PRODUCT = YES


// code generation
GCC_OPTIMIZATION_LEVEL = 4
GCC_UNROLL_LOOPS = YES


// preprocessing
GCC_PREPROCESSOR_DEFINITIONS = $(COMMON_GCC_PREPROCESSOR_DEFINITIONS) NDEBUG
17 changes: 17 additions & 0 deletions xcconfig/fsevent_watch.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// linking
MACH_O_TYPE = mh_execute
OTHER_LDFLAGS = -sectcreate __TEXT __info_plist "$(DERIVED_FILE_DIR)/Info.plist"
GENERATE_MASTER_OBJECT_FILE = YES


// packaging
INFOPLIST_FILE = Info.plist
PRODUCT_NAME = $(TARGET_NAME)


// versioning
CURRENT_PROJECT_VERSION = 0.1.1


// preprocessing
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) PROJECT_VERSION="$(CURRENT_PROJECT_VERSION)"

0 comments on commit 0bb6853

Please sign in to comment.