-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
C/C++ language standards should be set per-target #1079
Comments
@brentleyjones Do you have an example where a Swift package combines c and c++ in the same target? If so, I will use it as a test case. |
I don't know of one in the wild. I'm not even 100% sure SwiftPM allows it (though I expect it does). I know Bazel does, and it leads to issues with |
Maybe they can't be both C++ and C at the same time? https://github.com/swiftlang/swift-package-manager/blob/ce099264a187759c2f587393bd209d317a0352b4/Sources/PackageModel/Target.swift#L487 |
I am going to write the support as if it can be one or the other. If we run into a real-world example that says otherwise, I will adjust the logic accordingly. |
Refactor the resource bundle code so that the accessor generation is not buried in a shared function. This is a precursor for implementing #1079.
We shouldn't recommend that users set workspace-wide
--copt
/--cxxopt
flags. Instead we should set the required flags on the{cc,objc}_library
targets. If a target has both C and C++ files, we may need to split the target in two in order to apply the correct flag to each one.The text was updated successfully, but these errors were encountered: