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

Set CLANG_ENABLE_MODULES to YES when generating projects #1422

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/Xcodeproj/XcodeProjectModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ public struct Xcode {
// a boolean may be a macro reference expression.
var CLANG_CXX_LANGUAGE_STANDARD: String?
var CLANG_ENABLE_OBJC_ARC: String?
var CLANG_ENABLE_MODULES: String?
var COMBINE_HIDPI_IMAGES: String?
var COPY_PHASE_STRIP: String?
var DEBUG_INFORMATION_FORMAT: String?
Expand Down
2 changes: 2 additions & 0 deletions Sources/Xcodeproj/pbxproj().swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ func xcodeProject(

// Enable `Automatic Reference Counting` for Objective-C sources
projectSettings.common.CLANG_ENABLE_OBJC_ARC = "YES"
// Enable Modules
projectSettings.common.CLANG_ENABLE_MODULES = "YES"

// Add some debug-specific settings.
projectSettings.debug.COPY_PHASE_STRIP = "NO"
Expand Down
1 change: 1 addition & 0 deletions Tests/XcodeprojTests/PackageGraphTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class PackageGraphTests: XCTestCase {
XCTAssertEqual(project.buildSettings.common.SDKROOT, "macosx")
XCTAssertEqual(project.buildSettings.common.SUPPORTED_PLATFORMS!, ["macosx", "iphoneos", "iphonesimulator", "appletvos", "appletvsimulator", "watchos", "watchsimulator"])
XCTAssertEqual(project.buildSettings.common.CLANG_ENABLE_OBJC_ARC, "YES")
XCTAssertEqual(project.buildSettings.common.CLANG_ENABLE_MODULES, "YES")
XCTAssertEqual(project.buildSettings.release.SWIFT_OPTIMIZATION_LEVEL, "-Owholemodule")
XCTAssertEqual(project.buildSettings.debug.SWIFT_OPTIMIZATION_LEVEL, "-Onone")

Expand Down