mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
CONFIG: consolidate C++ flags per compiler type
- easier to ensure that flags are consistent
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
SUFFIXES += .c
|
||||
|
||||
cWARN = -Wall
|
||||
|
||||
cc = armclang
|
||||
|
||||
cWARN = -Wall
|
||||
|
||||
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
|
||||
|
||||
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
|
||||
|
||||
@ -1,22 +1,9 @@
|
||||
SUFFIXES += .C .cc .cpp .cxx
|
||||
|
||||
c++WARN = \
|
||||
-Wall -Wextra -Wold-style-cast \
|
||||
-Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
|
||||
-Wno-undefined-var-template \
|
||||
-Wno-unknown-warning-option
|
||||
|
||||
# Suppress some warnings for flex++ and CGAL
|
||||
c++LESSWARN = \
|
||||
-Wno-old-style-cast -Wno-unused-local-typedefs \
|
||||
-Wno-tautological-undefined-compare -Wno-shift-negative-value
|
||||
include $(GENERAL_RULES)/Clang/c++
|
||||
|
||||
CC = armclang++ -std=c++11
|
||||
|
||||
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
|
||||
|
||||
ptFLAGS = -DNoRepository -ftemplate-depth-100
|
||||
|
||||
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
|
||||
|
||||
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
|
||||
|
||||
@ -3,7 +3,7 @@ CPP = cpp -traditional-cpp $(GFLAGS)
|
||||
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
|
||||
|
||||
include $(GENERAL_RULES)/standard
|
||||
include $(GENERAL_RULES)/Clang/openmp
|
||||
|
||||
include $(DEFAULT_RULES)/openmp
|
||||
include $(DEFAULT_RULES)/c
|
||||
include $(DEFAULT_RULES)/c++
|
||||
|
||||
@ -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
|
||||
Reference in New Issue
Block a user