Files
swift-system/Package.swift
T
Lucy Satheesan 0762f57d80 migrate CSystem to systemLibrary
for some reason, the linker on my linux machine fails
to link the tests otherwise. investigate / fix before merging.
2023-08-10 16:03:21 -07:00

48 lines
1.3 KiB
Swift

// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
/*
This source file is part of the Swift System open source project
Copyright (c) 2020 Apple Inc. and the Swift System project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See https://swift.org/LICENSE.txt for license information
*/
import PackageDescription
let package = Package(
name: "swift-system",
products: [
.library(name: "SystemPackage", targets: ["SystemPackage"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-atomics", from: "1.1.0")
],
targets: [
.systemLibrary(
name: "CSystem"),
.target(
name: "SystemPackage",
dependencies: [
"CSystem",
.product(name: "Atomics", package: "swift-atomics")
],
path: "Sources/System",
cSettings: [
.define("_CRT_SECURE_NO_WARNINGS")
],
swiftSettings: [
.define("SYSTEM_PACKAGE"),
.define("ENABLE_MOCKING", .when(configuration: .debug))
]),
.testTarget(
name: "SystemTests",
dependencies: ["SystemPackage"],
swiftSettings: [
.define("SYSTEM_PACKAGE")
]),
]
)