Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Test Target, with -Weverything, get warning/error: "Treating #import as an import of module 'Foundation' in XCAbstractTest.h" #17

Closed
churowa opened this issue Nov 26, 2014 · 2 comments

Comments

@churowa
Copy link

churowa commented Nov 26, 2014

I've found that when I include a test target with KZBootstrap, The test target fails to compile, because many of the XCTest classes (like XCAbstractTest) are using #import instead of the module import (@). These are warnings from the compiler, but with "Treat Warnings As Errors" turned on, they stop the compilation. I can't figure out which warning flag I'd need to disable.

I notice that when I remove -Weverything from the test target's warning flags setting, the warnings disappear. I can even use -Wall and -Wextra, and everything builds nicely. Does anyone know if there is a specific warning flag I could turn off to stop the compiler from worrying about this? I've looked for it, but I can't figure out which one it might be. Where might I look?

OR; have I messed something up in the Podfile? I've seen this in two separate projects when trying to get KZBootstrap set up, but it could be something in MY configuration that's causing problems.

screen shot 2014-11-26 at 3 28 24 pm

@krzysztofzablocki
Copy link
Owner

Issue Not related to Bootstrap project, Just relax warnings in test target to allow non modular imports

Krzysztof Zabłocki
Co-Founder
Pixle.pl

On Wed, Nov 26, 2014 at 10:57 PM, churowa notifications@github.com
wrote:

I've found that when I include a test target with KZBootstrap, The test target fails to compile, because many of the XCTest classes (like XCAbstractTest) are using #import instead of the module import (@). These are warnings from the compiler, but with "Treat Warnings As Errors" turned on, they stop the compilation. I can't figure out which warning flag I'd need to disable.
I notice that when I remove -Weverything from the test target's warning flags setting, the warnings disappear. I can even use -Wall and -Wextra, and everything builds nicely. Does anyone know if there is a specific warning flag I could turn off to stop the compiler from worrying about this? I've looked for it, but I can't figure out which one it might be. Where might I look?
OR; have I messed something up in the Podfile? I've seen this in two separate projects when trying to get KZBootstrap set up, but it could be something in MY configuration that's causing problems.

screen shot 2014-11-26 at 3 28 24 pm

Reply to this email directly or view it on GitHub:
#17

@churowa
Copy link
Author

churowa commented Nov 27, 2014

THAT'S what I have to do. Yes! Thank you again. I was looking for some sort of -Wno-restrict-something-modules flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants