Xcode:LLVM 7.0:禁用警告“模块的伞头不包括头". [英] Xcode: LLVM 7.0: Disable warning "Umbrella header for module does not include header"
问题描述
为了使我的Objective-C框架在Swift可可触摸框架中成功链接,我不得不使用这种不完善的解决方法,这涉及将所有框架标头作为公共标头导入到项目中.
In order for my Objective-C framework to link successfully in my Swift cocoa touch framework, I had to use this unpretty workaround, which involves importing all framework headers into the project as public headers.
我完全不需要所有这些都出现在我的伞形标题中,因此我想以某种方式删除生成的一堆警告. (模块'Foo'的伞头不包括头").我在构建设置中查看了LLVM警告设置,但找不到它.
I totally don't need all of them appearing in my umbrella header, so I want to somehow remove the bunch of warnings generated. ("Umbrella header for module 'Foo' does not include header"). I went through LLVM warning settings in the build settings, but could not found it.
推荐答案
如果您是从编译Swift源文件"中获得此警告的,则▸预编译桥接标头"的构建步骤(也标记为PrecompileSwiftBridgingHeader
),这是以下方法你压制它:
If you're getting this warning from a "Compile Swift source files" ▸ "Precompile bridging header" build step (also labeled PrecompileSwiftBridgingHeader
), here's how you suppress it:
- 找到项目的构建设置.
- 搜索其他Swift标志".
- 将
-Xcc
和-Wno-incomplete-umbrella
添加到其他Swift标志"(按此顺序).
- Find the Build Settings for your project.
- Search for "Other Swift Flags".
- Add
-Xcc
and-Wno-incomplete-umbrella
to "Other Swift Flags" (in that order).
这篇关于Xcode:LLVM 7.0:禁用警告“模块的伞头不包括头".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!