Skip to content

Commit

Permalink
Merge pull request #1069 from jw-meelogic/master
Browse files Browse the repository at this point in the history
Fixed compilation on Linux
  • Loading branch information
tristanhimmelman committed May 16, 2020
2 parents d6b3948 + 1f15e22 commit 7d96a07
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion Package.swift
@@ -1,5 +1,11 @@
import PackageDescription

let package = Package(
name: "ObjectMapper"
name: "ObjectMapper",
targets: [
.target(
name: "ObjectMapper",
path: "Sources"
)
],
)
2 changes: 1 addition & 1 deletion Package@swift-4.2.swift
Expand Up @@ -11,7 +11,7 @@ let package = Package(
targets: [
.target(
name: "ObjectMapper",
dependencies: []
path: "Sources"
)
],
swiftLanguageVersions: [.v3, .v4, .v4_2]
Expand Down
2 changes: 1 addition & 1 deletion Package@swift-4.swift
Expand Up @@ -11,7 +11,7 @@ let package = Package(
targets: [
.target(
name: "ObjectMapper",
dependencies: []
path: "Sources"
)
],
swiftLanguageVersions = [3, 4]
Expand Down
2 changes: 2 additions & 0 deletions Sources/Mapper.swift
Expand Up @@ -114,6 +114,7 @@ public final class Mapper<N: BaseMappable> {
}
} catch let error {
#if DEBUG
#if !os(Linux)
let exception: NSException
if let mapError = error as? MapError {
exception = NSException(name: .init(rawValue: "MapError"), reason: mapError.description, userInfo: nil)
Expand All @@ -122,6 +123,7 @@ public final class Mapper<N: BaseMappable> {
}
exception.raise()
#endif
#endif
}
} else {
// Ensure BaseMappable is not implemented directly
Expand Down
1 change: 0 additions & 1 deletion Sources/ObjectMapper

This file was deleted.

0 comments on commit 7d96a07

Please sign in to comment.