I’m very familiar with MS’s Visual Studio environment, and recently I had to do some stuff for iPhone. I have a c++ project and I have performance critical components included as part of the project. This performance critical file absolutely must be compiled using optimized settings even for debug builds. That is, I have to overwrite settings for a file and pass -O2 -DNDEBUG when compiling one of the files of the project without affecting default compilation settings of the rest of the project.
Can this be done, I spent like an hour browsing through menus of XCode and wasn’t able to find it!
If you go to your project window and select the file, you can get info on it with command-i or right clicking. Then go to the build tab, where you can enter additional compilation flags for this particular file.
I am on xcode 3.x but I don’t imagine that they would remove this.
I note that this is just for additional compiler flags. If you need to remove some of your default flags the only option I can think of is a bit of a pain: make a new target that is set up with build options just for this file and include that target in your main target.