diff --git a/.spi.yml b/.spi.yml index 1b85910..4c4e6f7 100644 --- a/.spi.yml +++ b/.spi.yml @@ -1,4 +1,4 @@ version: 1 builder: configs: - - documentation_targets: [Numerics, RealModule, ComplexModule] + - documentation_targets: [Numerics, RealModule, ComplexModule, BigIntModule] diff --git a/Package.swift b/Package.swift index 88d22e0..1a02f77 100644 --- a/Package.swift +++ b/Package.swift @@ -28,7 +28,8 @@ let package = Package( // MARK: - Public API .target( name: "BigIntModule", - dependencies: [] + dependencies: [], + exclude: excludedFilenames ), .target( @@ -45,7 +46,7 @@ let package = Package( .target( name: "Numerics", - dependencies: ["ComplexModule", "IntegerUtilities", "RealModule"], + dependencies: ["ComplexModule", "IntegerUtilities", "RealModule", "BigIntModule"], exclude: excludedFilenames ), diff --git a/Package@swift-5.4.swift b/Package@swift-5.4.swift index 80d2b4e..71ed362 100644 --- a/Package@swift-5.4.swift +++ b/Package@swift-5.4.swift @@ -18,6 +18,7 @@ let package = Package( name: "swift-numerics", products: [ + .library(name: "BigIntModule", targets: ["BigIntModule"]), .library(name: "ComplexModule", targets: ["ComplexModule"]), .library(name: "Numerics", targets: ["Numerics"]), .library(name: "RealModule", targets: ["RealModule"]), @@ -25,6 +26,12 @@ let package = Package( targets: [ // MARK: - Public API + .target( + name: "BigIntModule", + dependencies: [], + exclude: excludedFilenames + ), + .target( name: "ComplexModule", dependencies: ["RealModule"], @@ -39,7 +46,7 @@ let package = Package( .target( name: "Numerics", - dependencies: ["ComplexModule", "IntegerUtilities", "RealModule"], + dependencies: ["ComplexModule", "IntegerUtilities", "RealModule", "BigIntModule"], exclude: excludedFilenames ), @@ -65,6 +72,11 @@ let package = Package( ), // MARK: - Unit test bundles + .testTarget( + name: "BigIntTests", + dependencies: ["BigIntModule"] + ), + .testTarget( name: "ComplexTests", dependencies: ["_TestSupport"], diff --git a/README.md b/README.md index fc76b27..3f59e70 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ Questions about how to use Swift Numerics modules, or issues that are not clearl 1. [`RealModule`](Sources/RealModule/README.md) 2. [`ComplexModule`](Sources/ComplexModule/README.md) 3. [`IntegerUtilities`](Sources/IntegerUtilities/README.md) (on main only, not yet present in a released tag) +4. [`BigIntModule`](Sources/BigIntModule/README.md) (on branch only) ## Future expansion diff --git a/Sources/BigIntModule/CMakeLists.txt b/Sources/BigIntModule/CMakeLists.txt new file mode 100644 index 0000000..444f855 --- /dev/null +++ b/Sources/BigIntModule/CMakeLists.txt @@ -0,0 +1,16 @@ +#[[ +This source file is part of the Swift Numerics open source project + +Copyright (c) 2019 Apple Inc. and the Swift Numerics project authors +Licensed under Apache License v2.0 with Runtime Library Exception + +See https://swift.org/LICENSE.txt for license information +#]] + +add_library(BigIntModule + BigInt.swift) +set_target_properties(BigIntModule PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) + +_install_target(BigIntModule) +set_property(GLOBAL APPEND PROPERTY SWIFT_NUMERICS_EXPORTS BigIntModule) diff --git a/Sources/BigIntModule/README.md b/Sources/BigIntModule/README.md new file mode 100644 index 0000000..56dd1d8 --- /dev/null +++ b/Sources/BigIntModule/README.md @@ -0,0 +1,3 @@ +# Arbitrary-precision integers + +This module provides a `BigInt` type. \ No newline at end of file diff --git a/Sources/Numerics/CMakeLists.txt b/Sources/Numerics/CMakeLists.txt index 8104049..3e5f747 100644 --- a/Sources/Numerics/CMakeLists.txt +++ b/Sources/Numerics/CMakeLists.txt @@ -19,6 +19,7 @@ target_compile_options(Numerics PUBLIC # load symbol when validating the TBD -Xfrontend -validate-tbd-against-ir=none) target_link_libraries(Numerics PUBLIC + BigIntModule ComplexModule IntegerUtilities RealModule) diff --git a/Sources/Numerics/Numerics.swift b/Sources/Numerics/Numerics.swift index 2aa9903..0faa23d 100644 --- a/Sources/Numerics/Numerics.swift +++ b/Sources/Numerics/Numerics.swift @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// // A module that re-exports the complete Swift Numerics public API. +@_exported import BigIntModule @_exported import ComplexModule @_exported import IntegerUtilities @_exported import RealModule