CONFIG: consolidate C++ flags per compiler type

- easier to ensure that flags are consistent
This commit is contained in:
Mark Olesen
2018-03-21 11:50:57 +01:00
parent 936d897768
commit 2db4b0867e
79 changed files with 144 additions and 866 deletions

View File

@ -1,9 +1,9 @@
SUFFIXES += .c
cWARN = -Wall
cc = gcc
cWARN = -Wall
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC

View File

@ -1,20 +1,9 @@
SUFFIXES += .C .cc .cpp .cxx
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes \
-Wno-unknown-pragmas
# Suppress some warnings (flex++, CGAL, etc)
c++LESSWARN = \
-Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
-fpermissive
include $(GENERAL_RULES)/Gcc/c++
CC = g++ -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 $@

View File

@ -4,7 +4,7 @@ LD = ld
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
include $(GENERAL_RULES)/Gcc/openmp
include $(DEFAULT_RULES)/openmp
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++

View File

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