novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 463 forks source link

fix @import issue #537

Closed hechen closed 5 years ago

hechen commented 5 years ago

Hi,

After I upgraded pod version to 0.15.0 from 0.14.0, compiler told me error as below.

Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules

And I figured out that the 0.15.0-release makes the MQTTLog.h public which explicitly imports the MQTTLog.h into my Objective-C++ source file. And @import break it because modules are disabled in C++ related target.

Let's solve this problem through the clang macro to avoid @import in Objective-C++.

jcavar commented 5 years ago

Hello! Thank you for this, it looks good to me but PR is marked as Draft. Are there some more changes that you wanted to add?

hechen commented 5 years ago

Hello! Thank you for this, it looks good to me but PR is marked as Draft. Are there some more changes that you wanted to add?

@jcavar

My bad. I have switched PR to review.

jcavar commented 5 years ago

Thank you!