Skip to content

Commit de853bc

Browse files
authored
[CMake] Do not cache SWIFT_VERSION. (#9420)
This is mostly a function of the repo (for the user-visible version) and should not automatically be persisted from whenever you first configured.
1 parent 5bd3428 commit de853bc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ set(SWIFT_ANALYZE_CODE_COVERAGE FALSE CACHE STRING
105105
set_property(CACHE SWIFT_ANALYZE_CODE_COVERAGE PROPERTY
106106
STRINGS FALSE "NOT-MERGED" "MERGED")
107107

108-
set(SWIFT_VERSION "4.0" CACHE STRING
109-
"The user-visible version of the Swift compiler")
108+
# SWIFT_VERSION is deliberately /not/ cached so that an existing build directory
109+
# can be reused when a new version of Swift comes out (assuming the user hasn't
110+
# manually set it as part of their own CMake configuration).
111+
set(SWIFT_VERSION "4.0")
112+
110113
set(SWIFT_VENDOR "" CACHE STRING
111114
"The vendor name of the Swift compiler")
112115
set(SWIFT_COMPILER_VERSION "" CACHE STRING

0 commit comments

Comments
 (0)