-
Notifications
You must be signed in to change notification settings - Fork 35
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
[cmake] Build swift-testing with CMake. #387
Conversation
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.
Thanks for opening this PR! There's still some work to be done, but this is a great start.
Thank you @jeffdav! Appreciate the helpful contribution. I have several comments so far and will take a second pass tomorrow |
Open question: how do we test this change? |
e51a1a8
to
9e6e6d9
Compare
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.
This is looking good. I think disabling C++ exceptions on _TestingInternal
will help make the experience a little smoother, but beyond that, it seems to be working as I would expect. Install story can come later.
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
@grynspan any further concerns on your side? |
Nope, I defer to @etcwilde here. (FYI we don't use Swift's C++ interop feature, so its lack of support for exceptions doesn't make a difference to us. However, we also don't throw any exceptions or intend to catch any, so it's moot.) |
Oh—please update the file lists before merging. There are a number of new files added since you opened this PR. |
Done! |
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.
@swift-ci please test |
@jeffdav I know you folks obviously work with Windows. The Windows failure we're seeing is a compiler bug unrelated to your PR. If you're comfortable with merging the PR despite the failure, we can proceed. (I'm unsure if you can see a merge button—if not, ping me and I'll do it.) |
Yeah, I'm familiar with that compiler bug for other reasons. :) |
@grynspan Thanks for your help! I don't have a merge button. |
@swift-ci please test |
Add files needed to build swift-testing with CMake.
Motivation:
Being able to build with CMake is useful in many scenarios. The immediate need is to bring
swift-testing
to Windows. To do so we need to support a non-SPM path to allow building targets that would otherwise hit the export symbol limit on Windows.Modifications:
Testing
,TestingInternal
, andTestingMacros
.TestingMacros
as anExternalProject
targeting the build machine.SwiftTesting_GenerateDerivedSources
which generates arunner-swift-testing.swift
and returns a variable that allows consumers to compile it with their sources.Result:
swift-testing
with CMake. Example command lines:swift-webdriver
to useswift-testing
via CMake.Checklist: