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

Limit use of Posix threads to Unix #4140

Merged
merged 1 commit into from
Mar 3, 2023
Merged

Limit use of Posix threads to Unix #4140

merged 1 commit into from
Mar 3, 2023

Conversation

hs-apotell
Copy link
Collaborator

Posix threads are available only on Unix (and unix like) platforms. Wrap the dependency accordingly so builds don't fail on other platforms.

Signed-off-by: HS hs@apotell.com

Posix threads are available only on Unix (and unix like) platforms.
Wrap the dependency accordingly so builds don't fail on other platforms.

Signed-off-by: HS <hs@apotell.com>
@hs-apotell
Copy link
Collaborator Author

@parrt Can you assist with getting this merged to master. Thanks!

@parrt
Copy link
Member

parrt commented Feb 25, 2023

hyperbusy but soon. we have similar PR btw.

@jmairboeck
Copy link

Threads is a built-in meta-target of CMake and should resolve to nothing on platforms which don't require a separate threading library anyway. So this is probably not needed.

@hs-apotell
Copy link
Collaborator Author

When antlr is exported as a dependency, Threads ends up in the antlr4.cmake file which doesn't resolve to nothing, at least on Windows. This is the currently the case for Surelog where the builds are failing for projects dependent on Surelog library, only on Windows where cmake fails to resolve it.

@hs-apotell
Copy link
Collaborator Author

@jmairboeck @parrt Any update on this PR?

@parrt parrt added this to the 4.12.1 milestone Mar 3, 2023
@parrt parrt merged commit d641b6b into antlr:dev Mar 3, 2023
@hs-apotell hs-apotell deleted the threads branch March 15, 2023 19:43
jimidle pushed a commit to jimidle/antlr4 that referenced this pull request Mar 28, 2023
Posix threads are available only on Unix (and unix like) platforms.
Wrap the dependency accordingly so builds don't fail on other platforms.

Signed-off-by: HS <hs@apotell.com>
Signed-off-by: Jim.Idle <jimi@idle.ws>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants