Add CMakeLists.txt for _CryptoExtras (#420)#437
Open
Akumar1313 wants to merge 1 commit intoapple:mainfrom
Open
Add CMakeLists.txt for _CryptoExtras (#420)#437Akumar1313 wants to merge 1 commit intoapple:mainfrom
Akumar1313 wants to merge 1 commit intoapple:mainfrom
Conversation
Author
|
@Lukasa can you review this pr and lmk if this change help with CMake for _CryptoExtras. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[One line description of your change]
Checklist
If you've made changes to
gybfiles./scripts/generate_boilerplate_files_with_gyb.shand included updated generated files in a commit of this pull requestMotivation:
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.