在 Xcode 中使用的最佳构建目录位置
我正在整合我的 Xcode/TextMate 设置,并对您放置 build
目录的位置感兴趣。
几年前,我开始将构建目录与我的 xcodeproj 文件放在同一目录中。 然而,当我的项目成为一个包含应用程序、框架和测试的多项目时,它变得一团糟,所以我开始使用 ../build
作为构建目录,以便所有子项目都使用相同的目录。然而,Spotlight 正在索引此构建目录,并且当项目中存在构建目录时,TextMate 的全局查找不可用。
我正在考虑使用 ~/.build
或 /build
作为 Xcode 的构建目录。
您使用什么 build
目录?为什么?
I'm consolidating my Xcode/TextMate setup and is interested in where you put your build
dir.
Some years ago I started out having the build dir in the same dir as my xcodeproj file.
However it became a mess when my project became a multi project with a applications and frameworks and tests, so I started using ../build
as the build dir, so that all the sub projects used the same dir. However Spotlight is indexing this build dir and TextMate's global find is unusable when there is a build dir in the project.
I'm thinking either using ~/.build
or /build
as Xcode's build dir.
What build
dir do you use and why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您让 Xcode 创建构建目录,那么它不应该被 Spotlight 索引(Xcode 专门在目录上设置了一个扩展属性来实现这一点)。如果它是来自已升级的旧项目的构建目录,或者是您手动创建的构建目录,则情况不会如此,它将被索引。如果缺少此属性,您可以手动添加该属性,也可以删除构建目录并让 Xcode 重新创建它。一旦你解决了这个问题,你应该可以很好地使用你的通用构建文件夹方案。
扩展属性是
com.apple.XcodeGenerated
。If you let Xcode create the build directory then it shouldn't get indexed by Spotlight (Xcode sets an extended attribute on the directory specifically to make this happen). If it's a build directory from an old project that been upgraded, or a build directory that you created manually, then this won't be the case and it will get indexed. You can either add this attribute manually if it's missing, or perhaps delete the build directory and let Xcode re-create it. Once you have this sorted out you should be good to go with your common build folder scheme.
The extended attribute is
com.apple.XcodeGenerated
.