Content originally posted in LPCWare by lpcxpresso-support on Thu Nov 28 01:51:50 MST 2013
Referenced projects have no real relationship to the project that references it, and so it is not possible to share settings between them.
Referenced projects just define a build order. During the build process, a Referenced project is built before the project that references it.
One way to share options would be as follows.
[list]
[*]gcc allows options to be provided from a command file, using the @file syntax. (see below for documentation)
[*]to share common options between projects, put the options into the command file and place it in a known place within your workspace.
[*]modify each project to add this @file option in the Miscellaneous Flags
[/list]
e.g. put the following into ../my_options
-DCOMMON_ONE
and then add @../my_options into the Miscellaneous flags for each project that wishes to use the common options.
Note: You can use Build macros in the filename (${workspace_loc:my_project}) but not in the command file itself.
Docs for @file:
@file
Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed.
Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.