Skip to content

Commit

Permalink
Sort add_subdirectory commands (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle authored Nov 3, 2024
1 parent 566d494 commit b9d6ecc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Generator/Sources/SwiftWinRT/writeProjectionFiles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal func writeProjectionFiles(
// See https://github.com/swiftlang/swift-driver/blob/6af4c7dbc0559694578e5221d49970f94603b9e5/Sources/SwiftDriver/Jobs/FrontendJobHelpers.swift#L714
writer.writeSingleLineCommand("add_compile_options", .unquoted("-driver-filelist-threshold=\(Int32.max)"))

for module in projection.modulesByName.values {
for module in projection.modulesByName.values.sorted(by: { $0.name < $1.name }) {
guard !module.isEmpty else { continue }
writer.writeAddSubdirectory(module.name)
}
Expand Down Expand Up @@ -236,6 +236,7 @@ fileprivate func writeNamespaceModuleFiles(
let writer = CMakeListsWriter(output: FileTextOutputStream(
path: "\(directoryPath)\\CMakeLists.txt",
directoryCreation: .ancestors))
compactNamespaces.sort()
for compactNamespace in compactNamespaces {
writer.writeAddSubdirectory(compactNamespace)
}
Expand Down

0 comments on commit b9d6ecc

Please sign in to comment.