Prevent Xcode from being generated when there are warnings

I want my Xcode project to have no warnings. How do I configure Xcode so that it doesn't build as long as there are warnings?

+3


source to share


2 answers


set treat warnings as errors = YES

in build settings



enter image description here

+4


source


You can add a switch -Werr

to the compiler flags (on the Build Phases tab if I remember correctly). This will cause the compiler to treat all warnings as errors, and it will suppress every warning.



0


source







All Articles