[CMake] Reduce path lengths in single-module build (#392)

* Eliminate relative paths from the cmake single-module build

* Attempt to reduce length of paths in single module build
This commit is contained in:
Jeremy Schonfeld authored and GitHub committed 2024-06-26 08:39:11 -07:00
1 parent af8349c392
commit 3e120b48bb
9 files changed
+166 -177

No files matched your search

+12 -10
View File
@@ -7,16 +7,10 @@ Licensed under Apache License v2.0 with Runtime Library Exception
See https://swift.org/LICENSE.txt for license information
#]]
list(APPEND COLLECTIONS_HEAP_SOURCES
"_HeapNode.swift"
"Heap.swift"
"Heap+Descriptions.swift"
"Heap+ExpressibleByArrayLiteral.swift"
"Heap+Invariants.swift"
"Heap+UnsafeHandle.swift")
set_property(GLOBAL APPEND PROPERTY COLLECTIONS_HEAP_SOURCES ${COLLECTIONS_HEAP_SOURCES})
if(NOT COLLECTIONS_SINGLE_MODULE)
if(COLLECTIONS_SINGLE_MODULE)
set(module_name ${COLLECTIONS_MODULE_NAME})
else()
set(module_name HeapModule)
add_library(HeapModule
${COLLECTIONS_HEAP_SOURCES})
target_link_libraries(HeapModule PRIVATE
@@ -27,3 +21,11 @@ if(NOT COLLECTIONS_SINGLE_MODULE)
_install_target(HeapModule)
set_property(GLOBAL APPEND PROPERTY SWIFT_COLLECTIONS_EXPORTS HeapModule)
endif()
target_sources(${module_name} PRIVATE
"_HeapNode.swift"
"Heap.swift"
"Heap+Descriptions.swift"
"Heap+ExpressibleByArrayLiteral.swift"
"Heap+Invariants.swift"
"Heap+UnsafeHandle.swift")