CONFIG: handle openmp on Darwin (#1656)

- requires -Xpreprocessor
- uses 'libomp' (no 'libgomp' link)
This commit is contained in:
Mark Olesen
2020-04-09 11:16:23 +02:00
parent 86e78ac3c1
commit 04b5291c55
7 changed files with 38 additions and 12 deletions

View File

@ -1,8 +0,0 @@
# Flags for compiling/linking openmp
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
# -
# Clang provides 'omp' and a link for 'gomp'.
# With 'gomp' we can use system libs.
COMP_OPENMP = -DUSE_OMP -fopenmp
LINK_OPENMP = -lgomp

View File

@ -0,0 +1 @@
openmp-gomp

View File

@ -0,0 +1,8 @@
# Flags for compiling/linking openmp
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
# -
# Clang provides 'omp' and a link for 'gomp'.
# With 'gomp' we can also use system libs.
COMP_OPENMP = -DUSE_OMP -fopenmp
LINK_OPENMP = -lgomp

View File

@ -0,0 +1,5 @@
# Flags for compiling/linking openmp
# The USE_OMP is for OpenFOAM-specific use (general use is _OPENMP)
COMP_OPENMP = -DUSE_OMP -fopenmp
LINK_OPENMP = -lomp

View File

@ -1,3 +0,0 @@
PFLAGS =
PINC =
PLIBS =

1
wmake/rules/General/mplib Symbolic link
View File

@ -0,0 +1 @@
no-mpi

View File

@ -0,0 +1,7 @@
# Empty flags for not compiling/linking MPI
PFLAGS =
PINC =
PLIBS =
#------------------------------------------------------------------------------

View File

@ -0,0 +1,6 @@
# Empty flags for not compiling/linking OPENMP
COMP_OPENMP =
LINK_OPENMP =
#------------------------------------------------------------------------------

View File

@ -3,7 +3,16 @@ CPP = cpp -traditional-cpp $(GFLAGS)
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
include $(GENERAL_RULES)/Clang/openmp
## include $(GENERAL_RULES)/Clang/openmp
# Darwin-specific
# ----
COMP_OPENMP = -DUSE_OMP -Xpreprocessor -fopenmp
LINK_OPENMP = -lomp
# ----
# Or disable
# include $(GENERAL_RULES)/no-openmp
# ----
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++