Skip to content

Commit a3c3d3e

Browse files
committed
Set version info with #define
Don't use `#cmakedefine` to define values that can be zero. `#cmakedefine` only sets the definition when the corresponding value in CMake itself has a truthy value. `0` has a false-y value, so SWIFT_VERSION_MINOR is undefined for 6.0 resulting in some things breaking.
1 parent af112c1 commit a3c3d3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/swift/Runtime/CMakeConfig.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#cmakedefine01 SWIFT_BNI_OS_BUILD
88
#cmakedefine01 SWIFT_BNI_XCODE_BUILD
99

10-
#cmakedefine SWIFT_VERSION_MAJOR "@SWIFT_VERSION_MAJOR@"
11-
#cmakedefine SWIFT_VERSION_MINOR "@SWIFT_VERSION_MINOR@"
10+
#define SWIFT_VERSION_MAJOR "@SWIFT_VERSION_MAJOR@"
11+
#define SWIFT_VERSION_MINOR "@SWIFT_VERSION_MINOR@"
1212

1313
#endif

0 commit comments

Comments
 (0)