David
David

Reputation: 14404

Prevent Xcode from building if there are warnings

I want my Xcode project to have no warnings. How can I configure Xcode such that it won't build as long as there are warnings?

Upvotes: 3

Views: 215

Answers (2)

Daij-Djan
Daij-Djan

Reputation: 50089

set treat warnings as errors = YES in the build settings

enter image description here

Upvotes: 4

user529758
user529758

Reputation:

You can add the -Werr switch to the compiler flags (on the Build phases tab, if I recall correctly). This will make the compiler treat all warnings as errors and it will choke on each warning.

Upvotes: 0

Related Questions