mbedmicro/mbed — pull request #452 by PrzemekWirkus (2014-08-20 10:08:17+00:00)
Title: Macros are not passed down to toolchain for compilation

# Problem:
* After last compilation improvement macros passed to toolchain object for compilation were not added to compilation symbols' list.
* macros and inc_dirs are used to change the way build scripts compile libraries. In case of cpputest library additional macros are in order (e.g. to remove some memory management etc.). Because macros were not included cpputest library and related tests failed to compile.
# Changes:
* added self.macros to self.symbols list/
* changed way self.symbols is updated with target symbols.
* removed trailing spaces from code (sorry for that, it makes this pull not so clear to read).

# Issue Traceback:
```python
Compile: MemoryLeakWarningPlugin.cpp
[Warning] Utest.h@200: #1300-D: testBody inherits implicit virtual
[Warning] Utest.h@221: #1300-D: createTest inherits implicit virtual
[Warning] TestOutput.h@145: #1300-D: printBuffer inherits implicit virtual
[Warning] TestOutput.h@150: #1300-D: flush inherits implicit virtual
[Error] MemoryLeakWarningPlugin.cpp@110: #540: support for exception handling is disabled; use --exceptions to enable
[Error] MemoryLeakWarningPlugin.cpp@122: #540: support for exception handling is disabled; use --exceptions to enable
[Error] MemoryLeakWarningPlugin.cpp@129: #540: support for exception handling is disabled; use --exceptions to enable
[Error] MemoryLeakWarningPlugin.cpp@141: #540: support for exception handling is disabled; use --exceptions to enable
[Error] MemoryLeakWarningPlugin.cpp@160: #540: support for exception handling is disabled; use --exceptions to enable
[Error] MemoryLeakWarningPlugin.cpp@172: #540: support for exception handling is disabled; use --exceptions to enable
[Error] MemoryLeakWarningPlugin.cpp@179: #540: support for exception handling is disabled; use --exceptions to enable
[Error] MemoryLeakWarningPlugin.cpp@191: #540: support for exception handling is disabled; use --exceptions to enable
Traceback (most recent call last):
File "C:\Work\winbb\slave\BuildRelease\build\workspace_tools\singletest.py", line 194, in
singletest_in_cli_mode(single_test)
File "C:\Work\winbb\slave\BuildRelease\build\workspace_tools\test_api.py", line 1119, in singletest_in_cli_mode
test_summary, shuffle_seed = single_test.execute()
File "C:\Work\winbb\slave\BuildRelease\build\workspace_tools\test_api.py", line 352, in execute
jobs=self.opts_jobs)
File "C:\Work\winbb\slave\BuildRelease\build\workspace_tools\build_api.py", line 170, in build_lib
verbose=verbose, clean=clean, macros=MACROS, notify=notify, inc_dirs=lib.inc_dirs, jobs=jobs)
File "C:\Work\winbb\slave\BuildRelease\build\workspace_tools\build_api.py", line 155, in build_library
objects.extend(toolchain.compile_sources(resource, tmp_path, dependencies_include_dir))
File "C:\Work\winbb\slave\BuildRelease\build\workspace_tools\toolchains\__init__.py", line 479, in compile_sources
return self.compile_seq(queue, objects)
File "C:\Work\winbb\slave\BuildRelease\build\workspace_tools\toolchains\__init__.py", line 492, in compile_seq
res['command']
File "C:\Work\winbb\slave\BuildRelease\build\workspace_tools\toolchains\__init__.py", line 586, in compile_output
raise ToolException(stderr)
workspace_tools.utils.ToolException: "no source": Warning: #3036-D: "C:/Work/toolchains/ARMCompiler_5.03_117_Windows\include" was specified as both a system and non-system include directory -- the non-system entry will be ignored
```