File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,12 @@ function pbxFile(filepath, opt) {
8383
8484 if ( opt . weak && opt . weak === true )
8585 this . settings = { ATTRIBUTES : [ 'Weak' ] } ;
86+
87+ if ( opt . compilerFlags ) {
88+ if ( ! this . settings )
89+ this . settings = { } ;
90+ this . settings . COMPILER_FLAGS = opt . compilerFlags ;
91+ }
8692}
8793
8894module . exports = pbxFile ;
Original file line number Diff line number Diff line change @@ -191,5 +191,13 @@ exports['settings'] = {
191191
192192 test . deepEqual ( { ATTRIBUTES :[ "Weak" ] } , sourceFile . settings ) ;
193193 test . done ( ) ;
194+ } ,
195+
196+ 'should be {COMPILER_FLAGS:"blah"} if compiler flags specified' : function ( test ) {
197+ var sourceFile = new pbxFile ( 'Plugins/BarcodeScanner.m' ,
198+ { compilerFlags : "-fno-objc-arc" } ) ;
199+
200+ test . deepEqual ( { COMPILER_FLAGS :"-fno-objc-arc" } , sourceFile . settings ) ;
201+ test . done ( ) ;
194202 }
195203}
You can’t perform that action at this time.
0 commit comments