Skip to content

[cmake] Build version marker modules. #2616

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

Conversation

jeffdav
Copy link
Contributor

@jeffdav jeffdav commented Apr 22, 2024

This change adds the version marker modules to the CMake build, which were previously missing.

This replicates the behavior one gets when building w/SPM and allows consumers built with CMake to follow the #if canImport(SwiftSyntax###) convention for versioning macros.

@ahoppen
Copy link
Member

ahoppen commented Apr 22, 2024

The version marker modules are intentionally missing from the CMake build. The CMake build is primarily designed to be used when swift-syntax gets built to be linked into the compiler, which is always going to be in sync with the swift-syntax repository and thus doesn’t need them.

What’s your motivation for adding the version marker modules to the CMake build?

@jeffdav
Copy link
Contributor Author

jeffdav commented Apr 22, 2024

What’s your motivation for adding the version marker modules to the CMake build?

I'm building swift-testing with CMake on Windows, and it does the version checks.

@jeffdav
Copy link
Contributor Author

jeffdav commented Apr 23, 2024

Is there any downside to including them?

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. Just wanted to understand what you wanted to use them for.

@ahoppen
Copy link
Member

ahoppen commented Apr 23, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit 94e1cc9 into swiftlang:main Apr 24, 2024
@jeffdav jeffdav deleted the jeff/cmake-version-marker-modules branch April 24, 2024 15:55
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.

2 participants