Skip to content

CMake 4.0.1 fixes #22

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

Merged
merged 2 commits into from
May 5, 2025
Merged

Conversation

etcwilde
Copy link
Collaborator

@etcwilde etcwilde commented May 4, 2025

CMake 4.0 and newer does not set CMAKE_OSX_SYSROOT by default. We should only explicitly pass an SDK when there is an SDK to pass.

Also adding CMake 4.0.1 to the set of CMake versions to test.

Fixes: #18

etcwilde added 2 commits May 4, 2025 14:15
CMake 4.0 does not specify CMAKE_OSX_SYSROOT unless it is set
explicitly. When this is the case, passing the `-sdk` flag with an empty
path confuses the compiler and results in build failures.

This patch fixes things to only pass the sdk to the Swift compiler when
the SDK is actually set.
Adding CMake 4.0.1, the most recent CMake release, to the set of tested
CMake versions.
@etcwilde etcwilde requested a review from compnerd May 4, 2025 21:22
@etcwilde etcwilde merged commit e5ba407 into swiftlang:main May 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake 4.0 CMAKE_OSX_SYSROOT default is now empty
2 participants