#NEWLINE# def generate_xc_build_configuration( self ) : #NEWLINE# #INDENT# self . ofile . write ( '\n/* Begin XCBuildConfiguration section */\n' ) #NEWLINE# for buildtype in self . buildtypes : #NEWLINE# #INDENT# self . write_line ( ( '%s /* %s */ = {' % ( self . project_configurations [ buildtype ] , buildtype ) ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = XCBuildConfiguration;' ) #NEWLINE# self . write_line ( 'buildSettings = {' ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";' ) #NEWLINE# self . write_line ( 'ONLY_ACTIVE_ARCH = YES;' ) #NEWLINE# self . write_line ( 'SDKROOT = "macosx";' ) #NEWLINE# self . write_line ( ( 'SYMROOT = "%s/build";' % self . environment . get_build_dir ( ) ) ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# self . write_line ( ( 'name = "%s";' % buildtype ) ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# #UNINDENT# for buildtype in self . buildtypes : #NEWLINE# #INDENT# self . write_line ( ( '%s /* %s */ = {' % ( self . buildall_configurations [ buildtype ] , buildtype ) ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = XCBuildConfiguration;' ) #NEWLINE# self . write_line ( 'buildSettings = {' ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'COMBINE_HIDPI_IMAGES = YES;' ) #NEWLINE# self . write_line ( 'GCC_GENERATE_DEBUGGING_SYMBOLS = NO;' ) #NEWLINE# self . write_line ( 'GCC_INLINES_ARE_PRIVATE_EXTERN = NO;' ) #NEWLINE# self . write_line ( 'GCC_OPTIMIZATION_LEVEL = 0;' ) #NEWLINE# self . write_line ( 'GCC_PREPROCESSOR_DEFINITIONS = ("");' ) #NEWLINE# self . write_line ( 'GCC_SYMBOLS_PRIVATE_EXTERN = NO;' ) #NEWLINE# self . write_line ( 'INSTALL_PATH = "";' ) #NEWLINE# self . write_line ( 'OTHER_CFLAGS = "  ";' ) #NEWLINE# self . write_line ( 'OTHER_LDFLAGS = " ";' ) #NEWLINE# self . write_line ( 'OTHER_REZFLAGS = "";' ) #NEWLINE# self . write_line ( 'PRODUCT_NAME = ALL_BUILD;' ) #NEWLINE# self . write_line ( 'SECTORDER_FLAGS = "";' ) #NEWLINE# self . write_line ( ( 'SYMROOT = "%s";' % self . environment . get_build_dir ( ) ) ) #NEWLINE# self . write_line ( 'USE_HEADERMAP = NO;' ) #NEWLINE# self . write_line ( 'WARNING_CFLAGS = ("-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", );' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# self . write_line ( ( 'name = "%s";' % buildtype ) ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# #UNINDENT# for buildtype in self . buildtypes : #NEWLINE# #INDENT# self . write_line ( ( '%s /* %s */ = {' % ( self . test_configurations [ buildtype ] , buildtype ) ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = XCBuildConfiguration;' ) #NEWLINE# self . write_line ( 'buildSettings = {' ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'COMBINE_HIDPI_IMAGES = YES;' ) #NEWLINE# self . write_line ( 'GCC_GENERATE_DEBUGGING_SYMBOLS = NO;' ) #NEWLINE# self . write_line ( 'GCC_INLINES_ARE_PRIVATE_EXTERN = NO;' ) #NEWLINE# self . write_line ( 'GCC_OPTIMIZATION_LEVEL = 0;' ) #NEWLINE# self . write_line ( 'GCC_PREPROCESSOR_DEFINITIONS = ("");' ) #NEWLINE# self . write_line ( 'GCC_SYMBOLS_PRIVATE_EXTERN = NO;' ) #NEWLINE# self . write_line ( 'INSTALL_PATH = "";' ) #NEWLINE# self . write_line ( 'OTHER_CFLAGS = "  ";' ) #NEWLINE# self . write_line ( 'OTHER_LDFLAGS = " ";' ) #NEWLINE# self . write_line ( 'OTHER_REZFLAGS = "";' ) #NEWLINE# self . write_line ( 'PRODUCT_NAME = RUN_TESTS;' ) #NEWLINE# self . write_line ( 'SECTORDER_FLAGS = "";' ) #NEWLINE# self . write_line ( ( 'SYMROOT = "%s";' % self . environment . get_build_dir ( ) ) ) #NEWLINE# self . write_line ( 'USE_HEADERMAP = NO;' ) #NEWLINE# self . write_line ( 'WARNING_CFLAGS = ("-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", );' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# self . write_line ( ( 'name = "%s";' % buildtype ) ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# #UNINDENT# langnamemap = { #NEWLINE# #INDENT# 'c' : 'C' , #NEWLINE# 'cpp' : 'CPLUSPLUS' , #NEWLINE# 'objc' : 'OBJC' , #NEWLINE# 'objcpp' : 'OBJCPLUSPLUS' , #NEWLINE# #UNINDENT# } #NEWLINE# for ( target_name , target ) in self . build . targets . items ( ) : #NEWLINE# #INDENT# for buildtype in self . buildtypes : #NEWLINE# #INDENT# dep_libs = [ ] #NEWLINE# links_dylib = False #NEWLINE# headerdirs = [ ] #NEWLINE# for d in target . include_dirs : #NEWLINE# #INDENT# for sd in d . incdirs : #NEWLINE# #INDENT# cd = os . path . join ( d . curdir , sd ) #NEWLINE# headerdirs . append ( os . path . join ( self . environment . get_source_dir ( ) , cd ) ) #NEWLINE# headerdirs . append ( os . path . join ( self . environment . get_build_dir ( ) , cd ) ) #NEWLINE# #UNINDENT# #UNINDENT# for l in target . link_targets : #NEWLINE# #INDENT# abs_path = os . path . join ( self . environment . get_build_dir ( ) , l . subdir , buildtype , l . get_osx_filename ( ) ) #NEWLINE# dep_libs . append ( ( "'%s'" % abs_path ) ) #NEWLINE# if isinstance ( l , build . SharedLibrary ) : #NEWLINE# #INDENT# links_dylib = True #NEWLINE# #UNINDENT# #UNINDENT# if links_dylib : #NEWLINE# #INDENT# dep_libs = ( [ '-Wl,-search_paths_first' , '-Wl,-headerpad_max_install_names' ] + dep_libs ) #NEWLINE# #UNINDENT# dylib_version = None #NEWLINE# if isinstance ( target , build . SharedLibrary ) : #NEWLINE# #INDENT# ldargs = ( [ '-dynamiclib' , '-Wl,-headerpad_max_install_names' ] + dep_libs ) #NEWLINE# install_path = os . path . join ( self . environment . get_build_dir ( ) , target . subdir , buildtype ) #NEWLINE# dylib_version = target . version #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ldargs = dep_libs #NEWLINE# install_path = '' #NEWLINE# #UNINDENT# if ( dylib_version is not None ) : #NEWLINE# #INDENT# product_name = ( ( target . get_basename ( ) + '.' ) + dylib_version ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# product_name = target . get_basename ( ) #NEWLINE# #UNINDENT# ldargs += target . link_args #NEWLINE# ldstr = ' ' . join ( ldargs ) #NEWLINE# valid = self . buildconfmap [ target_name ] [ buildtype ] #NEWLINE# langargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for lang in self . environment . coredata . compilers : #NEWLINE# #INDENT# if ( lang not in langnamemap ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# gargs = self . build . global_args . get ( lang , [ ] ) #NEWLINE# targs = target . get_extra_args ( lang ) #NEWLINE# args = ( gargs + targs ) #NEWLINE# if ( len ( args ) > 0 ) : #NEWLINE# #INDENT# langargs [ langnamemap [ lang ] ] = args #NEWLINE# #UNINDENT# #UNINDENT# symroot = os . path . join ( self . environment . get_build_dir ( ) , target . subdir ) #NEWLINE# self . write_line ( ( '%s /* %s */ = {' % ( valid , buildtype ) ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = XCBuildConfiguration;' ) #NEWLINE# self . write_line ( 'buildSettings = {' ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'COMBINE_HIDPI_IMAGES = YES;' ) #NEWLINE# if ( dylib_version is not None ) : #NEWLINE# #INDENT# self . write_line ( ( 'DYLIB_CURRENT_VERSION = "%s";' % dylib_version ) ) #NEWLINE# #UNINDENT# self . write_line ( ( 'EXECUTABLE_PREFIX = "%s";' % target . prefix ) ) #NEWLINE# if ( target . suffix == '' ) : #NEWLINE# #INDENT# suffix = '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# suffix = ( '.' + target . suffix ) #NEWLINE# #UNINDENT# self . write_line ( ( 'EXECUTABLE_SUFFIX = "%s";' % suffix ) ) #NEWLINE# self . write_line ( 'GCC_GENERATE_DEBUGGING_SYMBOLS = YES;' ) #NEWLINE# self . write_line ( 'GCC_INLINES_ARE_PRIVATE_EXTERN = NO;' ) #NEWLINE# self . write_line ( 'GCC_OPTIMIZATION_LEVEL = 0;' ) #NEWLINE# self . write_line ( 'GCC_PREPROCESSOR_DEFINITIONS = ("");' ) #NEWLINE# self . write_line ( 'GCC_SYMBOLS_PRIVATE_EXTERN = NO;' ) #NEWLINE# if ( len ( headerdirs ) > 0 ) : #NEWLINE# #INDENT# quotedh = ',' . join ( [ ( '"\\"%s\\""' % i ) for i in headerdirs ] ) #NEWLINE# self . write_line ( ( 'HEADER_SEARCH_PATHS=(%s);' % quotedh ) ) #NEWLINE# #UNINDENT# self . write_line ( ( 'INSTALL_PATH = "%s";' % install_path ) ) #NEWLINE# self . write_line ( 'LIBRARY_SEARCH_PATHS = "";' ) #NEWLINE# if isinstance ( target , build . SharedLibrary ) : #NEWLINE# #INDENT# self . write_line ( 'LIBRARY_STYLE = DYNAMIC;' ) #NEWLINE# #UNINDENT# for ( langname , args ) in langargs . items ( ) : #NEWLINE# #INDENT# argstr = ' ' . join ( args ) #NEWLINE# self . write_line ( ( 'OTHER_%sFLAGS = "%s";' % ( langname , argstr ) ) ) #NEWLINE# #UNINDENT# self . write_line ( ( 'OTHER_LDFLAGS = "%s";' % ldstr ) ) #NEWLINE# self . write_line ( 'OTHER_REZFLAGS = "";' ) #NEWLINE# self . write_line ( ( 'PRODUCT_NAME = %s;' % product_name ) ) #NEWLINE# self . write_line ( 'SECTORDER_FLAGS = "";' ) #NEWLINE# self . write_line ( ( 'SYMROOT = "%s";' % symroot ) ) #NEWLINE# self . write_line ( 'USE_HEADERMAP = NO;' ) #NEWLINE# self . write_line ( 'WARNING_CFLAGS = ("-Wmost", "-Wno-four-char-constants", "-Wno-unknown-pragmas", );' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# self . write_line ( ( 'name = "%s";' % buildtype ) ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# #UNINDENT# #UNINDENT# self . ofile . write ( '/* End XCBuildConfiguration section */\n' )