We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39b854d commit 4f44d44Copy full SHA for 4f44d44
Package.swift
@@ -470,6 +470,12 @@ extension Array where Element == PackageDescription.CXXSetting {
470
471
// Capture the testing library's commit info as C++ constants.
472
if let git {
473
+ let testingLibraryVersion = if let tag = git.currentTag {
474
+ result.append(.define("SWT_TESTING_LIBRARY_VERSION", to: #""\#(testingLibraryVersion)""#))
475
+ } else {
476
+ result.append(.define("SWT_TESTING_LIBRARY_VERSION", to: "0"))
477
+ }
478
+
479
result.append(.define("SWT_TESTING_LIBRARY_COMMIT_HASH", to: #""\#(git.currentCommit)""#))
480
if git.hasUncommittedChanges {
481
result.append(.define("SWT_TESTING_LIBRARY_COMMIT_MODIFIED", to: "1"))
0 commit comments