Xcode 3.2.5: Make "Treat Warnings as Errors" and "Run Static Analyzer" both true for new projects
The Problem
Every time I create a new project in Xcode I 开发者_开发技巧have to go to Project > Edit Project Settings and navigate to Treat Warnings as Errors and Run Static Analyzer to turn them on. For the life of me I cannot seem to find out how to make this the default from now on.
What I Have Tried
Hunting through the menus. Google. Stackoverflow.com. A animal sacrifice in a graveyard at midnight (OK, I haven't tried that yet, but after this it is next on my list).
The Question
Is there a simple way of setting compiler settings for new projects?
Please don't tell me to upgrade to Xcode 4. I already have it (and have not explored to see if I can accomplish this task in it yet). I still will need Xcode 3 for a few months.
Whoops! Almost forgot -- thanks in advance!
The easiest way would be to simply create a custom project template that had those settings enabled. Create two new projects, change the settings in one - then do a diff on the project.pbxproj files for both to see how the settings occur in the project file.
Then find the existing project templates in:
/Developer/Library/Xcode/Project Templates
Copy them into the local custom project template directory in your local Library:
~/Library/Application Support/Developer/Shared/Xcode/Project Templates
(don't forget the space)
Then modify the project file in the project template to have the same changes you got out of the project diff before.
精彩评论