-
Notifications
You must be signed in to change notification settings - Fork 299
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
build: add a CMake based build for Windows #120
base: main
Are you sure you want to change the base?
Conversation
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@compnerd couldn't we generate the CMake files from SwiftPM? In SwiftNIO for example we generate the cocoapods using a script: https://github.com/apple/swift-nio/blob/master/scripts/build_podspecs.sh
If we just add the hard-coded CMake files, then we have two sources of truth. Then folks probably want to add Cocoapods files too and we'd have three. I think we should have one source of truth which is Package.swift
and generate everything from there using a script. SwiftPM can output a stable .json
description of the build.
@weissi - I don't think that package.swift has the information to really directly generate the CMake (its missing certain bits including list of sources, etc). s-p-m doesn't run on Windows really, so, this would need to be committed ahead of time. I think it may be possible to enhance CMake to generate Package.swift .... Either way, in the mean time, I think that this would block the use of swift-log on Windows :-( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, but somewhat nervous to merge a changes which have no (windows) CI validation 🤔
Given that swift-package-manager is not currently ready for Windows, this addition makes it possible to build for Windows.
I don’t think that the script would be trivial to write. Since s-p-m doesn’t work on windows though, not sure how much I can help. But, if you can write such a script, sure, having the output of it checked in would be fine (remember that s-p-m doesn’t run on Windows, so you cannot run the script on Windows, so the make would still need to be committed) |
@compnerd it just needs to work on Linux so the CI can verify that the checked in version is equal to the generated version. Happy to check it in (like the generated XCTest thingies) if we have checking that it's accurate. |
Hey there, we're planning to tag 1.3.0 soon -- not sure about status of this PR, what should we do here? |
I suggest we continue with release, and let this bake some more in the context of automating the generation of the CMake script or fixing SwiftPM to work on Windows |
Given that swift-package-manager is not currently ready for Windows,
this addition makes it possible to build for Windows.
[One line description of your change]
Motivation:
[Explain here the context, and why you're making that change. What is the problem you're trying to solve.]
Modifications:
[Describe the modifications you've done.]
Result:
[After your change, what will change.]