The export symbol regular expression processing is updated to make
several improvements:
* The export expression (export_symbols_regex) now applies to both
functions and global variables
* A named capture group is used to match symbols. This allows the
export expression to contain capture groups without disrupting the
expression matching
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'
Build flags like 'cflags', 'cxxflags' passed to xcode6 builds
are now considered by the xcode6 tool. For example, running command 'waf xcode6'
with the following wscript:
cnf.env.CXXFLAGS = ['-std=c++11']
...
bld.program(..., cxxflags='-O3')
now sets the OTHER_CPLUSCPLUSFLAGS in Xcode to '-O3 -std=c++11'
The tool was using an relative path for the includes, but an absolute
for the src-files. Protoc cannot distinguish between relative and
absolute paths and is not able to find sources when relative and
absolute paths are combined.
Tested with protoc 2.6.1, python 3.5.1
Because Python's set type is unordered, storing include paths in it
can produce unnecessary re-builds by generating different compiler
command lines between successive builds. Avoid this by using the
sorted() function on the includes.
The documentation for Python ≥ 2.7 guarantees that sorted() is stable,
while for Python 2.5–2.6 it uses the same algorithm as list.sort(),
which is stable [1].
[1]: https://stackoverflow.com/a/1915418
The 'source_files' param to the xcode6 tool was originally separated from the
conventional 'source' param because it was used to control how the source files
would appear in the XCode folder UI. Also, it'd allow to add any file extensions,
and not limited to those extensions supported by the loaded set of waf tools.
This commit renames 'source_files' param to 'group_files'. It also changes the semantic so that 'group_files' now is used like the following:
bld(
source='...', # These are now the files compiled by XCode
'group_files': ..., # Optionally customize the way source files appear i the UI
)
Previously, 'source_files' was used to collect source files for compilation in XCode, and to customize the UI folder structure. In this commit source_files is used only to let the user group files in different UI folders (and add additional resource files besides source files). I want to do the renaming to better reflect the param's meaning.
Additional changes:
* Remove unique_filereference
* Updated examples