diff --git a/Sources/BitCollections/CMakeLists.txt b/Sources/BitCollections/CMakeLists.txt new file mode 100644 index 000000000..e7f62c45d --- /dev/null +++ b/Sources/BitCollections/CMakeLists.txt @@ -0,0 +1,74 @@ +#[[ +This source file is part of the Swift Collections Open Source Project + +Copyright (c) 2022 Apple Inc. and the Swift project authors +Licensed under Apache License v2.0 with Runtime Library Exception + +See https://swift.org/LICENSE.txt for license information +#]] + +add_library(BitCollections + "BitArray/BitArray+BitwiseOperations.swift" + "BitArray/BitArray+ChunkedBitsIterators.swift" + "BitArray/BitArray+Codable.swift" + "BitArray/BitArray+Collection.swift" + "BitArray/BitArray+Copy.swift" + "BitArray/BitArray+CustomDebugStringConvertible.swift" + "BitArray/BitArray+CustomReflectable.swift" + "BitArray/BitArray+CustomStringConvertible.swift" + "BitArray/BitArray+Equatable.swift" + "BitArray/BitArray+ExpressibleByArrayLiteral.swift" + "BitArray/BitArray+Extras.swift" + "BitArray/BitArray+Fill.swift" + "BitArray/BitArray+Hashable.swift" + "BitArray/BitArray+Initializers.swift" + "BitArray/BitArray+Invariants.swift" + "BitArray/BitArray+Random.swift" + "BitArray/BitArray+RangeReplaceableCollection.swift" + "BitArray/BitArray+Testing.swift" + "BitArray/BitArray._UnsafeHandle.swift" + "BitArray/BitArray.swift" + "BitSet/BitSet+BidirectionalCollection.swift" + "BitSet/BitSet+Codable.swift" + "BitSet/BitSet+CustomDebugStringConvertible.swift" + "BitSet/BitSet+CustomReflectable.swift" + "BitSet/BitSet+CustomStringConvertible.swift" + "BitSet/BitSet+Equatable.swift" + "BitSet/BitSet+ExpressibleByArrayLiteral.swift" + "BitSet/BitSet+Extras.swift" + "BitSet/BitSet+Hashable.swift" + "BitSet/BitSet+Initializers.swift" + "BitSet/BitSet+Invariants.swift" + "BitSet/BitSet+Random.swift" + "BitSet/BitSet+SetAlgebra basics.swift" + "BitSet/BitSet+SetAlgebra conformance.swift" + "BitSet/BitSet+SetAlgebra formIntersection.swift" + "BitSet/BitSet+SetAlgebra formSymmetricDifference.swift" + "BitSet/BitSet+SetAlgebra formUnion.swift" + "BitSet/BitSet+SetAlgebra intersection.swift" + "BitSet/BitSet+SetAlgebra isDisjoint.swift" + "BitSet/BitSet+SetAlgebra isStrictSubset.swift" + "BitSet/BitSet+SetAlgebra isStrictSuperset.swift" + "BitSet/BitSet+SetAlgebra isSubset.swift" + "BitSet/BitSet+SetAlgebra isSuperset.swift" + "BitSet/BitSet+SetAlgebra subtract.swift" + "BitSet/BitSet+SetAlgebra subtracting.swift" + "BitSet/BitSet+SetAlgebra symmetricDifference.swift" + "BitSet/BitSet+SetAlgebra union.swift" + "BitSet/BitSet.Counted.swift" + "BitSet/BitSet.Index.swift" + "BitSet/BitSet._UnsafeHandle.swift" + "BitSet/BitSet.swift" + "Shared/Range+Utilities.swift" + "Shared/Slice+Utilities.swift" + "Shared/UInt+Tricks.swift" + "Shared/_BitPosition.swift" + "Shared/_Word.swift" + ) +target_link_libraries(BitCollections PRIVATE + _CollectionsUtilities) +set_target_properties(BitCollections PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) + +_install_target(BitCollections) +set_property(GLOBAL APPEND PROPERTY SWIFT_COLLECTIONS_EXPORTS BitCollections) diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt index 2fc30c870..5e48abb37 100644 --- a/Sources/CMakeLists.txt +++ b/Sources/CMakeLists.txt @@ -13,3 +13,4 @@ add_subdirectory(DequeModule) add_subdirectory(HeapModule) add_subdirectory(OrderedCollections) add_subdirectory(PersistentCollections) +add_subdirectory(_CollectionsUtilities) diff --git a/Sources/DequeModule/CMakeLists.txt b/Sources/DequeModule/CMakeLists.txt index 3287f3eff..28707ca3d 100644 --- a/Sources/DequeModule/CMakeLists.txt +++ b/Sources/DequeModule/CMakeLists.txt @@ -1,32 +1,33 @@ #[[ This source file is part of the Swift Collections Open Source Project -Copyright (c) 2021 Apple Inc. and the Swift project authors +Copyright (c) 2021-2022 Apple Inc. and the Swift project authors Licensed under Apache License v2.0 with Runtime Library Exception See https://swift.org/LICENSE.txt for license information #]] add_library(DequeModule - _DequeBuffer.swift - _DequeBufferHeader.swift - _DequeSlot.swift - _UnsafeWrappedBuffer.swift - Compatibility.swift - Deque._Storage.swift - Deque._UnsafeHandle.swift - Deque.swift - Deque+Codable.swift - Deque+Collection.swift - Deque+CustomDebugStringConvertible.swift - Deque+CustomReflectable.swift - Deque+CustomStringConvertible.swift - Deque+Equatable.swift - Deque+ExpressibleByArrayLiteral.swift - Deque+Extras.swift - Deque+Hashable.swift - Deque+Testing.swift - UnsafeMutableBufferPointer+Utilities.swift) + "Deque+Codable.swift" + "Deque+Collection.swift" + "Deque+CustomReflectable.swift" + "Deque+Descriptions.swift" + "Deque+Equatable.swift" + "Deque+ExpressibleByArrayLiteral.swift" + "Deque+Extras.swift" + "Deque+Hashable.swift" + "Deque+Sendable.swift" + "Deque+Testing.swift" + "Deque._Storage.swift" + "Deque._UnsafeHandle.swift" + "Deque.swift" + "_DequeBuffer.swift" + "_DequeBufferHeader.swift" + "_DequeSlot.swift" + "_UnsafeWrappedBuffer.swift" + ) +target_link_libraries(DequeModule PRIVATE + _CollectionsUtilities) set_target_properties(DequeModule PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) diff --git a/Sources/HeapModule/CMakeLists.txt b/Sources/HeapModule/CMakeLists.txt index 71cbc6b96..4c10b0913 100644 --- a/Sources/HeapModule/CMakeLists.txt +++ b/Sources/HeapModule/CMakeLists.txt @@ -13,6 +13,8 @@ add_library(HeapModule Heap+ExpressibleByArrayLiteral.swift Heap+Invariants.swift Heap+UnsafeHandle.swift) +target_link_libraries(HeapModule PRIVATE + _CollectionsUtilities) set_target_properties(HeapModule PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) diff --git a/Sources/OrderedCollections/CMakeLists.txt b/Sources/OrderedCollections/CMakeLists.txt index f595036c8..e6408926a 100644 --- a/Sources/OrderedCollections/CMakeLists.txt +++ b/Sources/OrderedCollections/CMakeLists.txt @@ -8,22 +8,19 @@ See https://swift.org/LICENSE.txt for license information #]] add_library(OrderedCollections - "HashTable/_HashTable.swift" "HashTable/_HashTable+Bucket.swift" "HashTable/_HashTable+BucketIterator.swift" "HashTable/_HashTable+Constants.swift" "HashTable/_HashTable+CustomStringConvertible.swift" - "HashTable/_Hashtable+Header.swift" "HashTable/_HashTable+Testing.swift" "HashTable/_HashTable+UnsafeHandle.swift" - - "OrderedDictionary/OrderedDictionary.swift" + "HashTable/_HashTable.swift" + "HashTable/_Hashtable+Header.swift" "OrderedDictionary/OrderedDictionary+Codable.swift" - "OrderedDictionary/OrderedDictionary+CustomDebugStringConvertible.swift" "OrderedDictionary/OrderedDictionary+CustomReflectable.swift" - "OrderedDictionary/OrderedDictionary+CustomStringConvertible.swift" + "OrderedDictionary/OrderedDictionary+Deprecations.swift" + "OrderedDictionary/OrderedDictionary+Descriptions.swift" "OrderedDictionary/OrderedDictionary+Elements+SubSequence.swift" - "OrderedDictionary/OrderedDictionary+Elements.swift" "OrderedDictionary/OrderedDictionary+Equatable.swift" "OrderedDictionary/OrderedDictionary+ExpressibleByDictionaryLiteral.swift" "OrderedDictionary/OrderedDictionary+Hashable.swift" @@ -31,15 +28,14 @@ add_library(OrderedCollections "OrderedDictionary/OrderedDictionary+Invariants.swift" "OrderedDictionary/OrderedDictionary+Partial MutableCollection.swift" "OrderedDictionary/OrderedDictionary+Partial RangeReplaceableCollection.swift" + "OrderedDictionary/OrderedDictionary+Sendable.swift" "OrderedDictionary/OrderedDictionary+Sequence.swift" "OrderedDictionary/OrderedDictionary+Values.swift" - "OrderedDictionary/OrderedDictionary+Deprecations.swift" - - "OrderedSet/OrderedSet.swift" + "OrderedDictionary/OrderedDictionary.Elements.swift" + "OrderedDictionary/OrderedDictionary.swift" "OrderedSet/OrderedSet+Codable.swift" - "OrderedSet/OrderedSet+CustomDebugStringConvertible.swift" "OrderedSet/OrderedSet+CustomReflectable.swift" - "OrderedSet/OrderedSet+CustomStringConvertible.swift" + "OrderedSet/OrderedSet+Descriptions.swift" "OrderedSet/OrderedSet+Diffing.swift" "OrderedSet/OrderedSet+Equatable.swift" "OrderedSet/OrderedSet+ExpressibleByArrayLiteral.swift" @@ -54,13 +50,16 @@ add_library(OrderedCollections "OrderedSet/OrderedSet+Partial SetAlgebra+Predicates.swift" "OrderedSet/OrderedSet+RandomAccessCollection.swift" "OrderedSet/OrderedSet+ReserveCapacity.swift" + "OrderedSet/OrderedSet+Sendable.swift" "OrderedSet/OrderedSet+SubSequence.swift" "OrderedSet/OrderedSet+Testing.swift" "OrderedSet/OrderedSet+UnorderedView.swift" "OrderedSet/OrderedSet+UnstableInternals.swift" - + "OrderedSet/OrderedSet.swift" "Utilities/_UnsafeBitset.swift" - "Utilities/RandomAccessCollection+Offsets.swift") + ) +target_link_libraries(OrderedCollections PRIVATE + _CollectionsUtilities) set_target_properties(OrderedCollections PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) diff --git a/Sources/PersistentCollections/CMakeLists.txt b/Sources/PersistentCollections/CMakeLists.txt new file mode 100644 index 000000000..c162866ba --- /dev/null +++ b/Sources/PersistentCollections/CMakeLists.txt @@ -0,0 +1,105 @@ +#[[ +This source file is part of the Swift Collections Open Source Project + +Copyright (c) 2022 Apple Inc. and the Swift project authors +Licensed under Apache License v2.0 with Runtime Library Exception + +See https://swift.org/LICENSE.txt for license information +#]] + +add_library(PersistentCollections + "Node/_AncestorSlots.swift" + "Node/_Bitmap.swift" + "Node/_Bucket.swift" + "Node/_Hash.swift" + "Node/_HashTreeIterator.swift" + "Node/_HashTreeStatistics.swift" + "Node/_Level.swift" + "Node/_Node+Builder.swift" + "Node/_Node+CustomStringConvertible.swift" + "Node/_Node+Debugging.swift" + "Node/_Node+Initializers.swift" + "Node/_Node+Invariants.swift" + "Node/_Node+Lookups.swift" + "Node/_Node+Primitive Insertions.swift" + "Node/_Node+Primitive Removals.swift" + "Node/_Node+Primitive Replacement.swift" + "Node/_Node+Storage.swift" + "Node/_Node+Structural compactMapValues.swift" + "Node/_Node+Structural filter.swift" + "Node/_Node+Structural intersection.swift" + "Node/_Node+Structural isDisjoint.swift" + "Node/_Node+Structural isEqual.swift" + "Node/_Node+Structural isSubset.swift" + "Node/_Node+Structural mapValues.swift" + "Node/_Node+Structural merge.swift" + "Node/_Node+Structural subtracting.swift" + "Node/_Node+Structural symmetricDifference.swift" + "Node/_Node+Structural union.swift" + "Node/_Node+Subtree Insertions.swift" + "Node/_Node+Subtree Modify.swift" + "Node/_Node+Subtree Removals.swift" + "Node/_Node+UnsafeHandle.swift" + "Node/_Node.swift" + "Node/_RawNode+UnsafeHandle.swift" + "Node/_RawNode.swift" + "Node/_Slot.swift" + "Node/_Stack.swift" + "Node/_StorageHeader.swift" + "Node/_UnmanagedNode.swift" + "Node/_UnsafePath.swift" + "PersistentDictionary/PersistentDictionary+Codable.swift" + "PersistentDictionary/PersistentDictionary+Collection.swift" + "PersistentDictionary/PersistentDictionary+CustomReflectable.swift" + "PersistentDictionary/PersistentDictionary+Debugging.swift" + "PersistentDictionary/PersistentDictionary+Descriptions.swift" + "PersistentDictionary/PersistentDictionary+Equatable.swift" + "PersistentDictionary/PersistentDictionary+ExpressibleByDictionaryLiteral.swift" + "PersistentDictionary/PersistentDictionary+Filter.swift" + "PersistentDictionary/PersistentDictionary+Hashable.swift" + "PersistentDictionary/PersistentDictionary+Initializers.swift" + "PersistentDictionary/PersistentDictionary+Keys.swift" + "PersistentDictionary/PersistentDictionary+MapValues.swift" + "PersistentDictionary/PersistentDictionary+Merge.swift" + "PersistentDictionary/PersistentDictionary+Sendable.swift" + "PersistentDictionary/PersistentDictionary+Sequence.swift" + "PersistentDictionary/PersistentDictionary+Values.swift" + "PersistentDictionary/PersistentDictionary.swift" + "PersistentSet/PersistentSet+Codable.swift" + "PersistentSet/PersistentSet+Collection.swift" + "PersistentSet/PersistentSet+CustomReflectable.swift" + "PersistentSet/PersistentSet+Debugging.swift" + "PersistentSet/PersistentSet+Descriptions.swift" + "PersistentSet/PersistentSet+Equatable.swift" + "PersistentSet/PersistentSet+ExpressibleByArrayLiteral.swift" + "PersistentSet/PersistentSet+Extras.swift" + "PersistentSet/PersistentSet+Filter.swift" + "PersistentSet/PersistentSet+Hashable.swift" + "PersistentSet/PersistentSet+Sendable.swift" + "PersistentSet/PersistentSet+Sequence.swift" + "PersistentSet/PersistentSet+SetAlgebra Initializers.swift" + "PersistentSet/PersistentSet+SetAlgebra basics.swift" + "PersistentSet/PersistentSet+SetAlgebra fluent basics.swift" + "PersistentSet/PersistentSet+SetAlgebra formIntersection.swift" + "PersistentSet/PersistentSet+SetAlgebra formSymmetricDifference.swift" + "PersistentSet/PersistentSet+SetAlgebra formUnion.swift" + "PersistentSet/PersistentSet+SetAlgebra intersection.swift" + "PersistentSet/PersistentSet+SetAlgebra isDisjoint.swift" + "PersistentSet/PersistentSet+SetAlgebra isEqual.swift" + "PersistentSet/PersistentSet+SetAlgebra isStrictSubset.swift" + "PersistentSet/PersistentSet+SetAlgebra isStrictSuperset.swift" + "PersistentSet/PersistentSet+SetAlgebra isSubset.swift" + "PersistentSet/PersistentSet+SetAlgebra isSuperset.swift" + "PersistentSet/PersistentSet+SetAlgebra subtract.swift" + "PersistentSet/PersistentSet+SetAlgebra subtracting.swift" + "PersistentSet/PersistentSet+SetAlgebra symmetricDifference.swift" + "PersistentSet/PersistentSet+SetAlgebra union.swift" + "PersistentSet/PersistentSet.swift" + ) +target_link_libraries(PersistentCollections PRIVATE + _CollectionsUtilities) +set_target_properties(PersistentCollections PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) + +_install_target(PersistentCollections) +set_property(GLOBAL APPEND PROPERTY SWIFT_COLLECTIONS_EXPORTS PersistentCollections) diff --git a/Sources/_CollectionsUtilities/CMakeLists.txt b/Sources/_CollectionsUtilities/CMakeLists.txt new file mode 100644 index 000000000..0be34d8ac --- /dev/null +++ b/Sources/_CollectionsUtilities/CMakeLists.txt @@ -0,0 +1,30 @@ +#[[ +This source file is part of the Swift Collections Open Source Project + +Copyright (c) 2022 Apple Inc. and the Swift project authors +Licensed under Apache License v2.0 with Runtime Library Exception + +See https://swift.org/LICENSE.txt for license information +#]] + +add_library(_CollectionsUtilities + "Array+WithContiguousStorage Compatibility.swift" + "CMakeLists.txt" + "Debugging.swift" + "Descriptions.swift" + "IntegerTricks/FixedWidthInteger+roundUpToPowerOfTwo.swift" + "IntegerTricks/Integer rank.swift" + "IntegerTricks/UInt+first and last set bit.swift" + "IntegerTricks/UInt+reversed.swift" + "RandomAccessCollection+Offsets.swift" + "UnsafeBufferPointer+Extras.swift" + "UnsafeMutableBufferPointer+Extras.swift" + "UnsafeMutableBufferPointer+SE-0370.swift" + "UnsafeMutablePointer+SE-0370.swift" + "UnsafeRawPointer extensions.swift" + ) +set_target_properties(_CollectionsUtilities PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) + +_install_target(_CollectionsUtilities) +set_property(GLOBAL APPEND PROPERTY SWIFT_COLLECTIONS_EXPORTS _CollectionsUtilities) diff --git a/Sources/_CollectionsUtilities/Integer tricks/FixedWidthInteger+roundUpToPowerOfTwo.swift b/Sources/_CollectionsUtilities/IntegerTricks/FixedWidthInteger+roundUpToPowerOfTwo.swift similarity index 100% rename from Sources/_CollectionsUtilities/Integer tricks/FixedWidthInteger+roundUpToPowerOfTwo.swift rename to Sources/_CollectionsUtilities/IntegerTricks/FixedWidthInteger+roundUpToPowerOfTwo.swift diff --git a/Sources/_CollectionsUtilities/Integer tricks/Integer rank.swift b/Sources/_CollectionsUtilities/IntegerTricks/Integer rank.swift similarity index 100% rename from Sources/_CollectionsUtilities/Integer tricks/Integer rank.swift rename to Sources/_CollectionsUtilities/IntegerTricks/Integer rank.swift diff --git a/Sources/_CollectionsUtilities/Integer tricks/UInt+first and last set bit.swift b/Sources/_CollectionsUtilities/IntegerTricks/UInt+first and last set bit.swift similarity index 100% rename from Sources/_CollectionsUtilities/Integer tricks/UInt+first and last set bit.swift rename to Sources/_CollectionsUtilities/IntegerTricks/UInt+first and last set bit.swift diff --git a/Sources/_CollectionsUtilities/Integer tricks/UInt+reversed.swift b/Sources/_CollectionsUtilities/IntegerTricks/UInt+reversed.swift similarity index 100% rename from Sources/_CollectionsUtilities/Integer tricks/UInt+reversed.swift rename to Sources/_CollectionsUtilities/IntegerTricks/UInt+reversed.swift