Skip to content

Add CMakeLists.txt for _CryptoExtras (#420)#437

Open
Akumar1313 wants to merge 1 commit into
apple:mainfrom
Akumar1313:first-issue
Open

Add CMakeLists.txt for _CryptoExtras (#420)#437
Akumar1313 wants to merge 1 commit into
apple:mainfrom
Akumar1313:first-issue

Conversation

@Akumar1313

Copy link
Copy Markdown

[One line description of your change]

Checklist

  • I've run tests to see all new and existing tests pass
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

If you've made changes to gyb files

  • I've run ./scripts/generate_boilerplate_files_with_gyb.sh and included updated generated files in a commit of this pull request

Motivation:

The Swift toolchain bootstrap builds SwiftPM using CMake, and SwiftPM depends on swift-certificates, which in turn depends on _CryptoExtras. Every module in swift-crypto has a CMakeLists.txt except _CryptoExtras, causing the CMake bootstrap to fail with a missing module error.

Fixes #420.

Modifications:

Added Sources/_CryptoExtras/CMakeLists.txt that declares the _CryptoExtras library target with its single source file (Exports.swift), links it against CryptoExtras, and registers it in the SWIFT_CRYPTO_EXPORTS property.
Added add_subdirectory(_CryptoExtras) to Sources/CMakeLists.txt after CryptoExtras to respect the dependency ordering.

Result:

The _CryptoExtras module is now discoverable by CMake, allowing swift-certificates (and any other downstream CMake consumer) to resolve its dependency on _CryptoExtras during the toolchain bootstrap build.

@Akumar1313

Copy link
Copy Markdown
Author

@Lukasa can you review this pr and lmk if this change help with CMake for _CryptoExtras.

@Lukasa Lukasa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_CryptoExtras needs a CMakeLists.txt

2 participants