g-Off
g-Off

Reputation: 105

Xcode xcconfig file and build rules

I have an Xcode project that contains many sub-projects. The main project file and all sub-projects have the same xcconfig file. Some of the sub-projects currently have a build rule set on them to use the Intel compiler for C++ files. I'm wondering if there is a way to move this build rule into the xcconfig file so that I can easily turn on or off the Intel compiler for C++ files by changing just the one xcconfig file instead of having to modify the build rule for each sub-project

Upvotes: 2

Views: 1833

Answers (1)

cdespinosa
cdespinosa

Reputation: 20799

No, the configuration files only contain build settings, not any other traits of projects or targets. You have to set up build rules manually, on each individual target.

You might want to look into using the GCC_VERSION build setting to determine the compiler, rather than a build rule.

Upvotes: 1

Related Questions