Xcode xcconfig 文件和构建规则
我有一个 Xcode 项目,其中包含许多子项目。主项目文件和所有子项目都有相同的xcconfig文件。目前,一些子项目设置了构建规则,以使用英特尔编译器来处理 C++ 文件。我想知道是否有一种方法可以将此构建规则移动到 xcconfig 文件中,以便我可以通过仅更改一个 xcconfig 文件来轻松打开或关闭 C++ 文件的英特尔编译器,而不必修改每个文件的构建规则子项目
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,配置文件仅包含构建设置,不包含项目或目标的任何其他特征。您必须在每个单独的目标上手动设置构建规则。
您可能想考虑使用 GCC_VERSION 构建设置来确定编译器,而不是构建规则。
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.