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

Use check_c_source_compiles for PTHREAD_MUTEX_RECURSIVE #1158

Closed
mathstuf opened this Issue Oct 23, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@mathstuf
Copy link
Contributor

mathstuf commented Oct 23, 2018

As explained in this VTK issue, PTHREAD_MUTEX_RECURSIVE might be an rvalue in some implementations and therefore incompatible with check_symbol_exists. Instead, check_c_source_compiles should be used instead.

@kbevers

This comment has been minimized.

Copy link
Member

kbevers commented Oct 23, 2018

@mathstuf Thanks for reporting this. Would you be willing to submit a PR with a fix to this?

@mathstuf

This comment has been minimized.

Copy link
Contributor Author

mathstuf commented Oct 23, 2018

Yeah, I should be able to get around to it some time this week or next.

@kbevers

This comment has been minimized.

Copy link
Member

kbevers commented Oct 23, 2018

Awesome! Thank you very much.

mathstuf added a commit to mathstuf/proj.4 that referenced this issue Oct 26, 2018

cmake: detect PTHREAD_MUTEX_RECURSIVE by compiling
The `check_symbol_exists` cannot detect `#define symbol 1` because it
takes the address of the symbol to detect it, but the address of a
literal is not allowed. Some platforms define `PTHREAD_MUTEX_RECURSIVE`
by such a literal.

Fixes OSGeo#1158

mathstuf added a commit to mathstuf/proj.4 that referenced this issue Oct 26, 2018

cmake: detect PTHREAD_MUTEX_RECURSIVE by compiling
The `check_symbol_exists` cannot detect `#define symbol 1` because it
takes the address of the symbol to detect it, but the address of a
literal is not allowed. Some platforms define `PTHREAD_MUTEX_RECURSIVE`
by such a literal.

Fixes OSGeo#1158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.