From fe1bb1b58a8c58459a8d48c6c3d6c53d714660c4 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 1 Jul 2017 13:23:04 +0200 Subject: [PATCH] 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' --- playground/xcode6/wscript | 4 ++-- waflib/extras/xcode6.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/playground/xcode6/wscript b/playground/xcode6/wscript index a18f72f9..50711be8 100644 --- a/playground/xcode6/wscript +++ b/playground/xcode6/wscript @@ -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'}} diff --git a/waflib/extras/xcode6.py b/waflib/extras/xcode6.py index ef2ae258..0c97ea28 100644 --- a/waflib/extras/xcode6.py +++ b/waflib/extras/xcode6.py @@ -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()