File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,18 @@ list(APPEND CMAKE_MODULE_PATH ${SwiftCore_CMAKE_MODULES_DIR})
41
41
include (CMakeWorkarounds )
42
42
# NOTE: always use the 3-component style as the expansion as
43
43
# `${PROJECT_VERSION}` will not extend this to the complete form and this can
44
- # change the behaviour for comparison with non-SemVer compliant parsing.
45
- project (SwiftCore LANGUAGES C CXX Swift VERSION 6.1.0 )
44
+ # change the behaviour for comparison with non-SemVer compliant parsing. If
45
+ # possible, use the 4-version component as that is used to differentiate the
46
+ # builds of the runtime for Windows.
47
+ if ($ENV{BUILD_NUMBER} )
48
+ # NOTE: SxS modules have a limit on each component being [0-65535].
49
+ # https://learn.microsoft.com/en-us/windows/win32/sbscs/assembly-versions
50
+ math (EXPR BUILD_NUMBER "$ENV{BUILD_NUMBER} % 65535" )
51
+ set (BUILD_NUMBER ".${BUILD_NUMBER} " )
52
+ endif ()
53
+ project (SwiftCore
54
+ LANGUAGES C CXX Swift
55
+ VERSION 6.1.0${BUILD_NUMBER} )
46
56
47
57
# The Swift standard library is not intended for use as a sub-library as part of
48
58
# another project. It is tightly coupled with the compiler version.
You can’t perform that action at this time.
0 commit comments