In the answer to this question, gcc treat all warnings as errors EXCEPT X it is shown how all warnings can be treated as errors except one.
First we add the compiler flag that treats all warnings as errors:
-Werror
Then we add exceptions to the above rule (in this case error called deprecated
)
-Wno-error=deprecated
Is there a similar method in Microsoft Visual C++?