-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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] Enable IN_LIST compare policy #4999
Conversation
Given that LLVM requires CMake 3.4.3 which has this by default wouldn't it be better to just raise Swift's CMake minimum version to 3.4.3 instead of setting the policy? |
@llvm-beanz We do require cmake 3.4.3. Just no one has gotten around to changing the actual requirement in source b/c of potential policy differences. Maybe that is the right fix here? |
I'd love to do so, but perhaps in a separate commit? In that future commit I could remove the |
@modocache, sounds reasonable to me. |
@llvm-beanz @modocache Also SGTM |
With that being said: @swift-ci Please test |
Hmmm... I actually wanted to do a clean cmake build. |
@swift-ci Please clean test |
Build failed |
Interesting. Libdispatch failed probably due to dependency race issues. |
@swift-ci Please clean test os x platform |
Build failed |
@swift-ci Please clean test os x platform |
Build failed |
@swift-ci please test os x platform |
Build failed |
@swift-ci please test os x platform |
Build failed |
8cffc57
to
b296a73
Compare
@swift-ci please test |
@swift-ci Please test |
Build failed |
Build failed |
Hmm, I'm pretty baffled here. Running the exact same preset on my macOS machine succeeds. I don't understand where these Dispatch SDK overlay errors are coming from. Does anyone have any tips? |
@jrose-apple This sounds like something up your alley. |
For what it's worth, I have Xcode 8.0 (8A218a) installed, on macOS Sierra 10.12. |
@@ -618,8 +618,7 @@ function(_add_swift_library_single target name) | |||
else() | |||
string(REPLACE swift "" module_name "${name}") | |||
endif() | |||
list(FIND SWIFT_API_NOTES_INPUTS "${module_name}" overlay_index) | |||
if(NOT ${overlay_index} EQUAL -1) | |||
if("${modue_name}" IN_LIST SWIFT_API_NOTES_INPUTS) |
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.
Typo: missing "l". :-)
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 why I love CMake. Thanks, @jrose-apple! ❤️
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.
And sure enough, a completely clean build did reproduce this on my macOS machine. Geez! 😬
Enable CMake policy CMP0057, which allows `if()` statements to use the `IN_LIST` operator. In addition, simplify several `if()` statements that used the `list(FIND ...)` operation instead.
b296a73
to
3123b47
Compare
@swift-ci Please test |
OK, this finally seems good to merge. Look OK to you, @gottesmm? |
No worries. LGTM. |
I actually reviewed it on the bus, but the bus reached the destination. Sorry! |
Enable CMake policy CMP0057, which allows
if()
statements to use theIN_LIST
operator. In addition, simplify severalif()
statements that used thelist(FIND ...)
operation instead.This pull request was split out of #4972, which addresses SR-1362.