Skip to content

Define SWIFT_PACKAGE in generated Xcode projects #616

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

Merged
merged 1 commit into from
Aug 25, 2016
Merged

Define SWIFT_PACKAGE in generated Xcode projects #616

merged 1 commit into from
Aug 25, 2016

Conversation

mxcl
Copy link
Contributor

@mxcl mxcl commented Aug 24, 2016

This mimics the behavior in standard swift-build instantiations.

Refs mxcl/PromiseKit#516

@@ -288,6 +288,9 @@ extension Module {
// At the moment, set the Swift version to 3 (we will need to make this dynamic), but for now this is necessary.
buildSettings["SWIFT_VERSION"] = "3.0"

// Defined for regular `swift build` instantiations, so also should be defined here.
buildSettings["OTHER_SWIFT_FLAGS"] = "-DSWIFT_PACKAGE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should use SWIFT_ACTIVE_COMPILATION_CONDITIONS instead of OTHER_SWIFT_FLAGS, otherwise LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was worried that was Xcode 8 only, but maybe that's fine? Will update.

This mimics the behavior in standard swift-build instantiations.
@ddunbar
Copy link
Contributor

ddunbar commented Aug 25, 2016

Cool, thanks!

@swift-ci please test

@ddunbar ddunbar merged commit cb3ab81 into swiftlang:master Aug 25, 2016
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

Successfully merging this pull request may close these issues.

2 participants