-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[6.0.0] Plumb through the testing library version into a function ins…
…tead of a C++ macro. (#650) **Explanation:** Correctly sets the testing library version (it was failing to set on the Swift side.) **Scope:** Building with CMake **Issue:** N/A **Original PR:** #648 **Risk:** Low **Testing:** Built a toolchain and verified the string was ingested all the way through. **Reviewer:** @grynspan @briancroom
- Loading branch information
Showing
5 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
// Licensed under Apache License v2.0 with Runtime Library Exception | ||
// | ||
// See https://swift.org/LICENSE.txt for license information | ||
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
// | ||
|
||
#include "Versions.h" | ||
|
||
const char *swt_getTestingLibraryVersion(void) { | ||
#if defined(_SWT_TESTING_LIBRARY_VERSION) | ||
return _SWT_TESTING_LIBRARY_VERSION; | ||
#else | ||
#warning _SWT_TESTING_LIBRARY_VERSION not defined: testing library version is unavailable | ||
return nullptr; | ||
#endif | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
// Licensed under Apache License v2.0 with Runtime Library Exception | ||
// | ||
// See https://swift.org/LICENSE.txt for license information | ||
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors | ||
// | ||
|
||
#if !defined(SWT_VERSIONS_H) | ||
#define SWT_VERSIONS_H | ||
|
||
#include "Defines.h" | ||
|
||
SWT_ASSUME_NONNULL_BEGIN | ||
|
||
/// Get the human-readable version of the testing library. | ||
/// | ||
/// - Returns: A human-readable string describing the version of the testing | ||
/// library, or `nullptr` if no version information is available. This | ||
/// string's value and format may vary between platforms, releases, or any | ||
/// other conditions. Do not attempt to parse it. | ||
SWT_EXTERN const char *_Nullable swt_getTestingLibraryVersion(void); | ||
|
||
SWT_ASSUME_NONNULL_END | ||
|
||
#endif |