-
Notifications
You must be signed in to change notification settings - Fork 260
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
fails to link external OpenMP library #917
Comments
Could you please uncomment those two lines and try again? Lines 709 to 710 in 15bd824
|
Also, which version of clang are you using? Because I tried to reproduce this in our Mac CI Build, but it keeps reporting that only openMP 201107 is supported, which in insufficient. No matter if libomp is installed or not. |
Uncommenting those lines fixes the linking, but it doesn't find the include file (/usr/local/include/omp.h) without also adding ${OpenMP_C_INCLUDE_DIR} to the include directories. My clang is 12.0.5 as provided by Xcode 12.5 (currently the latest):
The parallel sound font loading does work nicely on macOS with these changes. |
By the way, the latest MSVC does support OpenMP 4.0 for 64-bit Windows applications. I haven't tested it yet as 32-bit support (which I need) is coming later. |
A PR is ready for this, feel free to test. Unfortunately, Mac11 is still not publicly available for Github Actions and AzureDevOps (actions/runner-images#2486), so I cannot see whether it actually works. |
That's working perfectly for me. Thanks. |
On macOS, the clang/LLVM compiler does not include OpenMP support but it is available as an external library via brew:
When this library is installed, it is correctly detected by the cmake scripts, but then the compile fails because src/CMakeLists.txt fails to include the include directory and fails to link the library.
I was able to get this to work by adding
and to target_link_libraries
This last one doesn't look 100% correct although it does work; the cmake script has not calculated a nice linker flag (-lomp).
The text was updated successfully, but these errors were encountered: