diff --git a/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/maccatalyst-arm64_arm64e_x86_64/AttributeGraph.framework/Headers/AGVersion.h b/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/maccatalyst-arm64_arm64e_x86_64/AttributeGraph.framework/Headers/AGVersion.h new file mode 100644 index 0000000..bb66cd2 --- /dev/null +++ b/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/maccatalyst-arm64_arm64e_x86_64/AttributeGraph.framework/Headers/AGVersion.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +AG_EXTERN_C_BEGIN + +AG_EXPORT const uint32_t AGVersion AG_SWIFT_NAME(version); + +AG_EXTERN_C_END diff --git a/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/maccatalyst-arm64_arm64e_x86_64/AttributeGraph.framework/Headers/AttributeGraph.h b/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/maccatalyst-arm64_arm64e_x86_64/AttributeGraph.framework/Headers/AttributeGraph.h index b53cfd7..fc20870 100644 --- a/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/maccatalyst-arm64_arm64e_x86_64/AttributeGraph.framework/Headers/AttributeGraph.h +++ b/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/maccatalyst-arm64_arm64e_x86_64/AttributeGraph.framework/Headers/AttributeGraph.h @@ -25,4 +25,5 @@ #include #include #include +#include #include diff --git a/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/macos-arm64_arm64e_x86_64/AttributeGraph.framework/Versions/A/Headers/AGVersion.h b/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/macos-arm64_arm64e_x86_64/AttributeGraph.framework/Versions/A/Headers/AGVersion.h new file mode 100644 index 0000000..bb66cd2 --- /dev/null +++ b/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/macos-arm64_arm64e_x86_64/AttributeGraph.framework/Versions/A/Headers/AGVersion.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +AG_EXTERN_C_BEGIN + +AG_EXPORT const uint32_t AGVersion AG_SWIFT_NAME(version); + +AG_EXTERN_C_END diff --git a/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/macos-arm64_arm64e_x86_64/AttributeGraph.framework/Versions/A/Headers/AttributeGraph.h b/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/macos-arm64_arm64e_x86_64/AttributeGraph.framework/Versions/A/Headers/AttributeGraph.h index b53cfd7..fc20870 100644 --- a/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/macos-arm64_arm64e_x86_64/AttributeGraph.framework/Versions/A/Headers/AttributeGraph.h +++ b/CompatibilityTesting/Frameworks/AttributeGraph.xcframework/macos-arm64_arm64e_x86_64/AttributeGraph.framework/Versions/A/Headers/AttributeGraph.h @@ -25,4 +25,5 @@ #include #include #include +#include #include diff --git a/Sources/ComputeCxx/Version/Version.c b/Sources/ComputeCxx/Version/Version.c new file mode 100644 index 0000000..31705eb --- /dev/null +++ b/Sources/ComputeCxx/Version/Version.c @@ -0,0 +1,3 @@ +#include "ComputeCxx/IAGVersion.h" + +const uint32_t IAGVersion = 0x00020021; // 2.0.33 diff --git a/Sources/ComputeCxx/include/ComputeCxx/ComputeCxx.h b/Sources/ComputeCxx/include/ComputeCxx/ComputeCxx.h index 4bbc5cd..91d982e 100644 --- a/Sources/ComputeCxx/include/ComputeCxx/ComputeCxx.h +++ b/Sources/ComputeCxx/include/ComputeCxx/ComputeCxx.h @@ -25,4 +25,5 @@ #include #include #include +#include #include diff --git a/Sources/ComputeCxx/include/ComputeCxx/IAGVersion.h b/Sources/ComputeCxx/include/ComputeCxx/IAGVersion.h new file mode 100644 index 0000000..00b661d --- /dev/null +++ b/Sources/ComputeCxx/include/ComputeCxx/IAGVersion.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +IAG_EXTERN_C_BEGIN + +IAG_EXPORT const uint32_t IAGVersion IAG_SWIFT_NAME(version); + +IAG_EXTERN_C_END diff --git a/Tests/ComputeTests/Shared/Version/VersionTests.swift b/Tests/ComputeTests/Shared/Version/VersionTests.swift new file mode 100644 index 0000000..2221fdb --- /dev/null +++ b/Tests/ComputeTests/Shared/Version/VersionTests.swift @@ -0,0 +1,21 @@ +import Testing + +@Suite +struct VersionTests { + @Test + func versionConstant() { + #if COMPATIBILITY_TESTS + if #available(macOS 26, iOS 26, tvOS 26, watchOS 26, *) { + #expect(version == 0x20021) + } else { + // not tested yet + } + #else + #if CompatibilityModeAttributeGraphV6 + #expect(version == 0x2001e) + #else + #expect(version == 0x20021) + #endif + #endif + } +}