swift-log icon indicating copy to clipboard operation
swift-log copied to clipboard

build: add a CMake based build for Windows

Open compnerd opened this issue 4 years ago • 7 comments

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.]

compnerd avatar Feb 26 '20 05:02 compnerd

Can one of the admins verify this patch?

swift-server-bot avatar Feb 26 '20 05:02 swift-server-bot

@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 :-(

compnerd avatar Feb 26 '20 16:02 compnerd

thanks for this @compnerd. I really like @weissi idea of generating these from the output of swift package dump-package, if can develop a script that does that, we could then have it added to the other swift-server projects until swift-pm gets windows support. wdyt?

tomerd avatar May 05 '20 03:05 tomerd

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 avatar May 05 '20 06:05 compnerd

@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.

weissi avatar May 05 '20 10:05 weissi

Hey there, we're planning to tag 1.3.0 soon -- not sure about status of this PR, what should we do here?

ktoso avatar Jul 06 '20 11:07 ktoso

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

tomerd avatar Jul 06 '20 17:07 tomerd