mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: handle openmp on Darwin (#1656)
- requires -Xpreprocessor - uses 'libomp' (no 'libgomp' link)
This commit is contained in:
@ -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
|
||||
1
wmake/rules/General/Clang/openmp
Symbolic link
1
wmake/rules/General/Clang/openmp
Symbolic link
@ -0,0 +1 @@
|
||||
openmp-gomp
|
||||
8
wmake/rules/General/Clang/openmp-gomp
Normal file
8
wmake/rules/General/Clang/openmp-gomp
Normal 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
|
||||
5
wmake/rules/General/Clang/openmp-omp
Normal file
5
wmake/rules/General/Clang/openmp-omp
Normal 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
|
||||
@ -1,3 +0,0 @@
|
||||
PFLAGS =
|
||||
PINC =
|
||||
PLIBS =
|
||||
1
wmake/rules/General/mplib
Symbolic link
1
wmake/rules/General/mplib
Symbolic link
@ -0,0 +1 @@
|
||||
no-mpi
|
||||
7
wmake/rules/General/no-mpi
Normal file
7
wmake/rules/General/no-mpi
Normal file
@ -0,0 +1,7 @@
|
||||
# Empty flags for not compiling/linking MPI
|
||||
|
||||
PFLAGS =
|
||||
PINC =
|
||||
PLIBS =
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
6
wmake/rules/General/no-openmp
Normal file
6
wmake/rules/General/no-openmp
Normal file
@ -0,0 +1,6 @@
|
||||
# Empty flags for not compiling/linking OPENMP
|
||||
|
||||
COMP_OPENMP =
|
||||
LINK_OPENMP =
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -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++
|
||||
|
||||
Reference in New Issue
Block a user