How to specify multiple, extra compiler flags

I want to add both -Werror and -Wno-unused-parameter to the command line. I feel like I have tried EVERYTHING I can think of commas, spaces, quotes, and multiple --build-property parameters...

What is the appropriate syntax for the following line?

--build-property compiler.cpp.extra_flags=-Wno-unused-parameter -Werror

I always use extra quotes:

--build-property compiler.cpp.extra_flags="-Wno-unused-parameter -Werror"

I'm not sure this fixes your problem though.

2 Likes

@jfjlaros That is the correct answer!

I realized I had forgotten to escape the quotes, because I was passing it in as a string to my CI. I ended up changing them to 'single ticks' and it worked. I think I could have also used backslash to escape them.

Thanks for the sanity check!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.