How do you set file-specific build settings in XCo

2020-02-26 08:12发布

问题:

In xcode 3 it was possible to configure specific option for building every single file of a project, like for example disabling specific warnings, thumb code generation and so on.
In xcode 4 such feature is not available, or at least not in an intuitive way. This is however supported, at least as a backward compatibility feature, in projects imported from xcode 3.x.

Does anyone knows a way to specify those settings without having to open the project back in older xcode or creating a project for every single file?

回答1:

Select the project in the navigator, then select the target from the list. Select the Build Phases tab, then expand the Compile Sources phase. The Compiler Flags column is where you specify per-file compiler flags.