Open BrushXue opened 1 year ago
The above option didn't work for me. However, I could fix it when I added the include directory.
COMP_OPENMP = -DUSE_OMP -Xpreprocessor -fopenmp -I/opt/homebrew/opt/libomp/include
LINK_OPENMP = -L/opt/homebrew/opt/libomp/lib -lomp
I am not sure if this problem should be solved in the rules files because installation prefix can vary from user to user. I solve OpenMP issues with two environment variables:
FOAM_EXTRA_CXXFLAGS=-I/usr/local/opt/libomp/include
FOAM_EXTRA_LDFLAGS=-L/usr/local/opt/libomp/lib
Here libomp
is installed with Homebrew on Intel macBook.
Recently
libomp
has been changed to keg-only https://github.com/Homebrew/homebrew-core/issues/112107So in
/wmake/rules/darwin64Clang/general
it should be changed to