Files
swift-mirror/cmake/SwiftVersion.cmake
Saleem Abdulrasool 08608390f0 cmake: extract version string and add PrintVersion.cmake
Add a helper to allow us to programatically extract the Swift version
string during the build. This is particularly useful for injection into
the packaging stages.

Co-authored-by: Evan Wilde <etceterawilde@gmail.com>
2023-03-27 11:53:36 -07:00

8 lines
344 B
CMake

# SWIFT_VERSION is deliberately /not/ cached so that an existing build directory
# can be reused when a new version of Swift comes out (assuming the user hasn't
# manually set it as part of their own CMake configuration).
set(SWIFT_VERSION_MAJOR 5)
set(SWIFT_VERSION_MINOR 9)
set(SWIFT_VERSION "${SWIFT_VERSION_MAJOR}.${SWIFT_VERSION_MINOR}")