-
Notifications
You must be signed in to change notification settings - Fork 50
build: add a CMake based build #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CC: @rxwei |
@swift-ci please test |
This is a first approximation of a CMake based build for this repository. The intent here is to localize the build rules for the repository to allow it to be consumed during the build of the toolchain. This allows the source list to be maintained in the repository as the source of truth rather than be explicitly listed in the swift repository. For general purpose development, the SPM based build is recommended. Unless there is a specific need for the tests to be included, testing should be done via the SPM build. This change is sufficient to build the content though does not perform the install or export steps which will be required to consume the results in the Swift build. Example invocation: ~~~ cmake -B S:\b\16 ^ -D CMAKE_BUILD_TYPE=Release ^ -D ArgumentParser_DIR=S:\b\10\cmake\modules ^ -G Ninja ^ -S S:\SourceCache\swift-experimental-string-processing cmake --build S:\b\16 ~~~
There's a lot in this package that should never be present in a build of the toolchain. Should we separate that out in CMake or another step? The only modules to land in the toolchain, AFAICT, would be |
Those would still need to be exposed to allow for other things to link against the targets. The installation into the toolchain distribution would be controlled at the Swift level, this repository only has to worry about is the bits that are vended and serialized into the module (i.e. if anything uses an I think that leaving in |
@swift-ci please test |
1 similar comment
@swift-ci please test |
@swift-ci please test macOS platform |
MacOS testing is still likely busted... CC @shahmishal |
@swift-ci please test macOS platform |
Ping, what should we do here? |
I think we should go ahead and merge this, and switch to add_subdirectory in apple/swift. |
Does that need to be a coordinated change? If not, feel free to click the big green button :-) |
No, that is independent - this is the first half, once this is merged and available in the checked out repository, we should be able to adjust the Swift build to do the right thing. |
This is a first approximation of a CMake based build for this
repository. The intent here is to localize the build rules for the
repository to allow it to be consumed during the build of the toolchain.
This allows the source list to be maintained in the repository as the
source of truth rather than be explicitly listed in the swift
repository.
For general purpose development, the SPM based build is recommended.
Unless there is a specific need for the tests to be included, testing
should be done via the SPM build.
This change is sufficient to build the content though does not perform
the install or export steps which will be required to consume the
results in the Swift build.
Example invocation: