nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
34 stars 19 forks source link

Investigate supporting @file syntax in TRICK_CFLAGS #380

Open dbankieris opened 7 years ago

dbankieris commented 7 years ago

gcc lets you list options in a 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.

ANTARES has so many -I paths that they've reached the command line length limit. It would be nice if they could use the above syntax, but ICG doesn't understand it.

alexlin0 commented 7 years ago

So I'm going to ask. Wouldn't it be better to reorganize the models, sim, S_overrides.mk, and/or environment in a way so that you don't have to do this? The command line length is huge, over 2Mb on my machine. If there are so many include directories you are filling this buffer, there is no way anyone knows what is being built or where header files are coming from.

alexlin0 commented 3 years ago

I retract my previous comment. We use the @file feature for building sims. We should try to support this. We think that ICG needs an upgrade to understand this syntax. We need to investigate how we support this when calling SWIG. SWIG 4 supports this.