From 5316942c3099a2423fcbffa792afb69f87fbeafe Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Wed, 29 May 2024 13:36:34 -0700 Subject: [PATCH] Add a dummy Future module This is a temporary staging area for prototyping potential future stdlib additions. (We do not expect to ship it in any tagged release of swift-collections.) --- Package.swift | 6 ++++++ Sources/CMakeLists.txt | 1 + Sources/Future/CMakeLists.txt | 20 ++++++++++++++++++++ Sources/Future/Dummy.swift | 3 +++ 4 files changed, 30 insertions(+) create mode 100644 Sources/Future/CMakeLists.txt create mode 100644 Sources/Future/Dummy.swift diff --git a/Package.swift b/Package.swift index 9abb4c8f..5299d965 100644 --- a/Package.swift +++ b/Package.swift @@ -206,6 +206,12 @@ let targets: [CustomTarget] = [ "UnsafeMutableBufferPointer+Extras.swift.gyb", ]), + .target( + kind: .exported, + name: "Future", + dependencies: ["_CollectionsUtilities"], + exclude: ["CMakeLists.txt"]), + .target( kind: .exported, name: "BitCollections", diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt index 2ab9a594..150d850b 100644 --- a/Sources/CMakeLists.txt +++ b/Sources/CMakeLists.txt @@ -7,6 +7,7 @@ Licensed under Apache License v2.0 with Runtime Library Exception See https://swift.org/LICENSE.txt for license information #]] +add_subdirectory(Future) add_subdirectory(BitCollections) add_subdirectory(Collections) add_subdirectory(DequeModule) diff --git a/Sources/Future/CMakeLists.txt b/Sources/Future/CMakeLists.txt new file mode 100644 index 00000000..015dc671 --- /dev/null +++ b/Sources/Future/CMakeLists.txt @@ -0,0 +1,20 @@ +#[[ +This source file is part of the Swift Collections Open Source Project + +Copyright (c) 2024 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(Future + "Dummy.swift" +) + +target_link_libraries(Future PRIVATE + _CollectionsUtilities) +set_target_properties(Future PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) + +_install_target(Future) +set_property(GLOBAL APPEND PROPERTY SWIFT_COLLECTIONS_EXPORTS Future) diff --git a/Sources/Future/Dummy.swift b/Sources/Future/Dummy.swift new file mode 100644 index 00000000..ec94910d --- /dev/null +++ b/Sources/Future/Dummy.swift @@ -0,0 +1,3 @@ +public func greet() { + print("Hello from the future!") +}