How can I manage the compiler settings globally?

Certain compiler options, like switched-on warnings, may be set as default values. Make files are often used for the build process wherein such options, include paths, or other details, are defined for the compiler. An alternate solution is to pass a configuration file to the compiler which contains the desired settings. The input of a file can be interpreted as command line options with the following compiler option: @<file>.

This reads command-line options from <file>. The options read are inserted in place of the original @file option. If the file does not exist, or the control program can not read the content, the option is treated literally, and not removed. Note that there is no '-'' (dash) before the '@' character, and there is no space between the '@' character and the filename. This option can be used more than once. The control program concatenates options from all subsequent files. Options in <file> are separated by whitespace. You can include an option with a whitespace character by surrounding the entire option in either single or double quotes. You can include any character (including a backslash) by prefixing the character to be included with a backslash. The file may itself contain additional @<file> options. The control program processes such options recursively. The @<file> option can be used together with -Wp,<options>, -Wa,<options>, -Wl,<options>.

For example, clang @commonopts.txt -Wp,@preprocessoropts.txt -Wa,@assembleropts.txt -Wl,@linkeropts.txt.