Skip to content

Commit 39ac686

Browse files
committed
Generate cmake files for _GenerateSwiftFormat
1 parent 79168ff commit 39ac686

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ var targets: [Target] = [
6060
),
6161
.target(
6262
name: "_GenerateSwiftFormat",
63-
dependencies: ["SwiftFormat"]
63+
dependencies: ["SwiftFormat"],
64+
exclude: ["CMakeLists.txt"]
6465
),
6566
.plugin(
6667
name: "Format Source Code",

Sources/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ See https://swift.org/LICENSE.txt for license information
99

1010
add_subdirectory(SwiftFormat)
1111
add_subdirectory(_SwiftFormatInstructionCounter)
12+
add_subdirectory(_GenerateSwiftFormat)
1213
add_subdirectory(swift-format)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#[[
2+
This source file is part of the swift-format open source project
3+
4+
Copyright (c) 2024 Apple Inc. and the swift-format project authors
5+
Licensed under Apache License v2.0 with Runtime Library Exception
6+
7+
See https://swift.org/LICENSE.txt for license information
8+
#]]
9+
10+
add_library(_GenerateSwiftFormat
11+
FileGenerator.swift
12+
GenerateSwiftFormatPaths.swift
13+
PipelineGenerator.swift
14+
RuleCollector.swift
15+
RuleDocumentationGenerator.swift
16+
RuleNameCacheGenerator.swift
17+
RuleRegistryGenerator.swift
18+
Syntax+Convenience.swift
19+
)
20+
21+
_install_target(_GenerateSwiftFormat)

Sources/swift-format/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ add_executable(swift-format
2727
Utilities/StderrDiagnosticPrinter.swift
2828
Utilities/TTY.swift)
2929
target_link_libraries(swift-format PRIVATE
30+
_GenerateSwiftFormat
3031
_SwiftFormatInstructionCounter
3132
ArgumentParser
3233
SwiftFormat

0 commit comments

Comments
 (0)