Score:0

Add gcc option to meson

br flag

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

Score:0
br flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.