<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>in our code base we would like to add a warning compilation flags.<br>
Nevertheless, this flag prevents us from compiling a few targets so we<br>
would like to remove this flag for the given targets.<br>
<br>Since I don't want to *add* a compilation flags but remove one, I would<br>
like to retrieve the properties of the target<br>
(get_target_property(my_compilation_flags TARGET COMPILE_FLAGS)), and<br>
then modify those and use it to set the properties of the target.<br></blockquote><br>Instead of removing, have you tried appending the -Wno-fubar flag that turns back off these<br>specific warnings for these specific files?</div><div class="gmail_quote"><br></div><div class="gmail_quote">With gcc for instance: <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html</a><br>"Each of these specific warning options also has a negative form beginning ‘-Wno-’</div><div class="gmail_quote">to turn off warnings; for example, -Wno-implicit. [...] For options of the same specificity,</div><div class="gmail_quote">the last one takes effect"<div><br></div></div></div>