Fixed a crash when building a subset of xcode6 targets

E.g. when running 'waf xcode6 --targets=some-target'

  File "/waf/waflib/Scripting.py", line 167, in waf_entry_point
    run_commands()
  File "/waf/waflib/Scripting.py", line 268, in run_commands
    ctx = run_command(cmd_name)
  File "/waf/waflib/Scripting.py", line 252, in run_command
    ctx.execute()
  File "/waf/waflib/extras/xcode6.py", line 679, in execute
    self.post_group()
  File "/waf/waflib/Build.py", line 767, in post_group
    if self.current_group < self._min_grp:
AttributeError: 'xcode' object has no attribute '_min_grp'
This commit is contained in:
Simon 2017-07-01 13:23:04 +02:00 committed by Thomas Nagy
parent 73c276c11b
commit fe1bb1b58a
2 changed files with 5 additions and 2 deletions

View File

@ -43,7 +43,7 @@ def configure(conf):
# This must be called at the end of configure()
conf.load('compiler_cxx xcode6')
conf.env.CXXFLAGS='-std=c++11'
conf.env.append_value('CXXFLAGS', ['-O2'])
conf.check(cxxflags='-std=c++11', uselib_store='STD11', mandatory=False)
@ -106,7 +106,7 @@ def build(bld):
target='MyApp',
use='MyLib',
uselib='SDL2',
cxxflags='-O3',
cxxflags='-DSOME_DEFINE',
framework='Cocoa',
# Override default setting in a target
settings={"Debug": {"CONFIG_NAME": 'Debug'}}

View File

@ -681,6 +681,9 @@ class xcode(Build.BuildContext):
# post all task generators
# the process_xcode method above will be called for each target
if self.targets and self.targets != '*':
(self._min_grp, self._exact_tg) = self.get_targets()
self.current_group = 0
while self.current_group < len(self.groups):
self.post_group()