For example, I need to add the following compiling switches (options) to gcc when meson makes the build directory:
-fmax-error=1 -Wall
How is it possible?
OS: Ubuntu 20.04
For example, I need to add the following compiling switches (options) to gcc when meson makes the build directory:
-fmax-error=1 -Wall
How is it possible?
OS: Ubuntu 20.04
You may add this as an example to the main meson.build file:
add_global_arguments('-fmax-errors=1', language : 'c')
If you need to add multiple gcc flags, you should repeat the line, one per an option (flag). Note that it should be placed after 'project' call, since it should be the first function call in the file.