Skip to content
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

Fix CMake build not handling @main attribute #711

Closed
wants to merge 3 commits into from
Closed

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Feb 9, 2023

Looks like @main atttribute is not automatically recognized with CMake in executables that have a single source file declared.

@MaxDesiatov MaxDesiatov self-assigned this Feb 9, 2023
@MaxDesiatov MaxDesiatov marked this pull request as ready for review February 9, 2023 14:53
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

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.

If you say so, I’m fine with this change. CC @compnerd

@compnerd
Copy link
Member

compnerd commented Feb 9, 2023

I forgot about SR-12683. An alternative is to pass -parse-as-library.

@MaxDesiatov
Copy link
Contributor Author

Passing -parse-as-library for an executable feels very wrong to me. I personally prefer to rename it back to main.swift.

@ahoppen
Copy link
Member

ahoppen commented Feb 9, 2023

Passing -parse-as-library for an executable feels very wrong to me. I personally prefer to rename it back to main.swift.

I agree

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

Closing in favor of #712

@MaxDesiatov MaxDesiatov closed this Feb 9, 2023
@MaxDesiatov MaxDesiatov deleted the maxd/fix-cmake branch February 9, 2023 18:30
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.

3 participants