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

Ignore unknown pragma warnings when building without OpenMP #1324

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

hainest
Copy link
Contributor

@hainest hainest commented Nov 14, 2022

Oddly, these also show up when ENABLE_STATIC_LIBS=OFF and USE_OpenMP=ON.

Fixes #1231

Oddly, these also show up when ENABLE_STATIC_LIBS=OFF and USE_OpenMP=ON.
@hainest hainest requested a review from kupsch November 14, 2022 22:49
@hainest hainest self-assigned this Nov 14, 2022
Copy link
Contributor

@kupsch kupsch left a comment

Choose a reason for hiding this comment

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

This is the simplest way to accomplish this, and what I'd say to do.

A slightly better way would be conditionally create a macro DYNINST_PRAGMA_OMP that expands to nothing when not openmp is not enabled and _Pragma(...) when enabled, but this would require more changes for the limited use case.

@hainest
Copy link
Contributor Author

hainest commented Nov 15, 2022

This is the simplest way to accomplish this, and what I'd say to do.

A slightly better way would be conditionally create a macro DYNINST_PRAGMA_OMP that expands to nothing when not openmp is not enabled and _Pragma(...) when enabled, but this would require more changes for the limited use case.

Yeah, a macro would likely cause issues down the road if/when more omp is used. I don't like hardcoding the flag names, but it's really the only way to do it in CMake.

@hainest hainest merged commit 5d24b50 into dyninst:master Nov 15, 2022
@hainest hainest deleted the thaines/build_static_nopragma branch November 15, 2022 22:06
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.

Unknown pragma warning when using -DENABLE_STATIC_LIBS=ON
2 participants