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

SPERR does not build with OpenMP on macOS #186

Closed
lindstro opened this issue Jan 30, 2023 · 1 comment
Closed

SPERR does not build with OpenMP on macOS #186

lindstro opened this issue Jan 30, 2023 · 1 comment

Comments

@lindstro
Copy link

Describe the bug
Building SPERR with Apple clang on macOS results in this compiler warning and no OpenMP support:

clang: warning: argument unused during compilation: '-Xclang -fopenmp' [-Wunused-command-line-argument]

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make

Expected and actual behavior
The build works when commenting out this line in src/CMakeLists.txt:

  target_compile_options(   SPERR PUBLIC ${OpenMP_CXX_FLAGS} )

This line appears unnecessary for Linux builds.

Environment (please complete the following information):

  • OS: macOS 11.7.2
  • Compiler: AppleClang 13.0.0.13000029
  • SPERR Version: 0.6 (and earlier versions)
@shaomeng
Copy link
Contributor

Apple supplied toolchain has a weird relationship with OpenMP, but it does look like that CMakeLists.txt line doesn't help anything except than introducing a warning. I've removed that command; thanks for finding out the offending line Peter!

@shaomeng shaomeng closed this as completed Feb 7, 2023
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

No branches or pull requests

2 participants