Skip to content

Commit a5f2f76

Browse files
authored
CMake: expose Swift version through CMakeConfig.cmake (#67152)
Rationale: we are using Swift compiler as a library in a downstream project and having these exposed would streamline version detection for our use case. Additionally, this PR makes CMake config a bit more uniform with LLVM/Clang configs.
1 parent 67e5f1e commit a5f2f76

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmake/modules/SwiftConfig.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
@SWIFT_CONFIG_CODE@
44

5+
set(SWIFT_VERSION_MAJOR @SWIFT_VERSION_MAJOR@)
6+
set(SWIFT_VERSION_MINOR @SWIFT_VERSION_MINOR@)
7+
set(SWIFT_VERSION_PATCH @SWIFT_VERSION_PATCHLEVEL@)
8+
59
set(SWIFT_VERSION @SWIFT_VERSION@)
610
set(SWIFT_MAIN_SRC_DIR @SWIFT_SOURCE_DIR@)
711

0 commit comments

Comments
 (0)