Skip to content

Enable use of package in code built with CMake#243

Merged
MaxDesiatov merged 2 commits intomainfrom
maxd/cmake-package-name
Dec 26, 2025
Merged

Enable use of package in code built with CMake#243
MaxDesiatov merged 2 commits intomainfrom
maxd/cmake-package-name

Conversation

@MaxDesiatov
Copy link
Member

@MaxDesiatov MaxDesiatov commented Dec 26, 2025

package keyword is only available when -package-name option is passed, which is not the case by default when building with CMake. This required use of @testable in our tests instead of package. Let's pass -package-name to fix this.

The long term goal is to make parts of WasmKitTests buildable with CMake to make it available it in code that can't be built with SwiftPM (e.g. when linking with LLVM).

`package` keyword is only available when `-package-name` option is passed, which is not the case by default when building with CMake. This required use of `@testable`, which makes testing code not buildable with CMake when attempting to replace use of `@testable` with `package`. Let's pass `-package-name` to fix this.
@MaxDesiatov MaxDesiatov added the cmake Updates to CMake build description label Dec 26, 2025
@MaxDesiatov MaxDesiatov marked this pull request as ready for review December 26, 2025 11:34
@MaxDesiatov MaxDesiatov merged commit 3b8c75e into main Dec 26, 2025
20 of 22 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/cmake-package-name branch December 26, 2025 12:00
MaxDesiatov added a commit that referenced this pull request Jan 3, 2026
Following up on #243 to make relevant code actually usable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Updates to CMake build description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants