diff --git a/etc/bashrc b/etc/bashrc
index df02f948af..65ee7c61f9 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -61,7 +61,7 @@ export WM_COMPILER_TYPE=system
# [WM_COMPILER] - Compiler:
# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-4] | Gcc7[1-3] | GccKNL |
-# Clang | Clang3[8-9] | Clang[45]0 | Icc | IccKNL | Cray | Arm
+# Clang | Clang3[8-9] | Clang[4-6]0 | Icc | IccKNL | Cray | Arm
export WM_COMPILER=Gcc
# [WM_ARCH_OPTION] - Memory addressing:
diff --git a/etc/bashrc.orig b/etc/bashrc.orig
deleted file mode 100644
index 4311e4781a..0000000000
--- a/etc/bashrc.orig
+++ /dev/null
@@ -1,203 +0,0 @@
-#----------------------------------*-sh-*--------------------------------------
-# ========= |
-# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
-# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
-# \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd.
-#------------------------------------------------------------------------------
-# License
-# This file is part of OpenFOAM, licensed under GNU General Public License
-# .
-#
-# File
-# etc/bashrc
-#
-# Description
-# Set OpenFOAM environment for POSIX shell (eg, bash,dash,zsh,...)
-# Source manually or from the ~/.profile or ~/.bashrc files.
-#
-# Note
-# Many environment variables can be overridden using a file
-# from one of these locations:
-# * user-specific:
-# * ~/.OpenFOAM/$WM_PROJECT_VERSION
-# * ~/.OpenFOAM
-# * group-specific:
-# * $WM_PROJECT_SITE/site/$WM_PROJECT_VERSION
-# * $WM_PROJECT_SITE/site
-# * general:
-# * $WM_PROJECT_DIR/etc
-#
-# Any changes made to this bashrc file may be lost with the next upgrade.
-#
-#------------------------------------------------------------------------------
-
-export WM_PROJECT=OpenFOAM
-export WM_PROJECT_VERSION=plus.develop
-
-# [FOAM_INST_DIR] - parent directory containing the OpenFOAM installation.
-# \- When this file is located as $WM_PROJECT_DIR/etc/bashrc, the next lines
-# should work when sourced by BASH or ZSH shells. If this however fails,
-# set one of the fallback values to an appropriate path.
-# --
-rc="${BASH_SOURCE:-${ZSH_NAME:+$0}}"
-[ -n "$rc" ] && FOAM_INST_DIR=$(\cd $(dirname $rc)/../.. && \pwd -L) || \
-FOAM_INST_DIR=$HOME/$WM_PROJECT
-# FOAM_INST_DIR=/opt/$WM_PROJECT
-# FOAM_INST_DIR=/usr/local/$WM_PROJECT
-#
-# END OF (NORMAL) USER EDITABLE PART
-################################################################################
-: # Extra safety - if the user commented out all fallback values
-export FOAM_INST_DIR
-unset rc
-
-# Default environment variables.
-# Can override with a file instead of editing below.
-
-# [WM_COMPILER_TYPE] - Compiler location:
-# = system | ThirdParty
-export WM_COMPILER_TYPE=system
-
-# [WM_COMPILER] - Compiler:
-# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-4] | Gcc7[1-3] | GccKNL |
-# Clang | Clang3[8-9] | Clang[45]0 | Icc | IccKNL | Cray
-export WM_COMPILER=Gcc
-
-# [WM_ARCH_OPTION] - Memory addressing:
-# = 32 | 64
-# * on a 64-bit OS this can be 32 or 64
-# * on a 32-bit OS, it is always 32-bit and this option is ignored
-export WM_ARCH_OPTION=64
-
-# [WM_PRECISION_OPTION] - Floating-point precision:
-# = DP | SP
-export WM_PRECISION_OPTION=DP
-
-# [WM_LABEL_SIZE] - Label size in bits:
-# = 32 | 64
-export WM_LABEL_SIZE=32
-
-# [WM_COMPILE_OPTION] - Optimised, debug, profiling:
-# = Opt | Debug | Prof
-export WM_COMPILE_OPTION=Opt
-
-# [WM_MPLIB] - MPI implementation:
-# = SYSTEMOPENMPI | OPENMPI | SYSTEMMPI | MPI | MPICH | MPICH-GM |
-# HPMPI | CRAY-MPICH | FJMPI | QSMPI | SGIMPI | INTELMPI | USERMPI
-export WM_MPLIB=SYSTEMOPENMPI
-
-
-# [FOAM_SIGFPE] - Trapping of floating-point exceptions.
-# - overrides the 'trapFpe' controlDict entry
-# = true | false
-#export FOAM_SIGFPE=true
-
-# [FOAM_SETNAN] - Memory initialisation as NaN
-# - overrides the 'setNaN' controlDict entry
-# = true | false
-#export FOAM_SETNAN=false
-
-# [WM_OSTYPE] - Operating System Type:
-# = POSIX
-#export WM_OSTYPE=POSIX
-
-################################################################################
-
-# Old directories to be cleaned from PATH, LD_LIBRARY_PATH
-foamOldDirs="$WM_PROJECT_DIR $WM_THIRD_PARTY_DIR \
- $HOME/$WM_PROJECT/$USER $FOAM_USER_APPBIN $FOAM_USER_LIBBIN \
- $WM_PROJECT_SITE $FOAM_SITE_APPBIN $FOAM_SITE_LIBBIN"
-
-# Location of installation and third-party software
-export WM_PROJECT_INST_DIR=$FOAM_INST_DIR
-export WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/$WM_PROJECT-$WM_PROJECT_VERSION
-export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
-
-# [WM_PROJECT_SITE] - Location of site-specific (group) files
-# default (unset) implies WM_PROJECT_INST_DIR/site
-if [ -d "$WM_PROJECT_SITE" ]
-then
- export WM_PROJECT_SITE
-else
- unset WM_PROJECT_SITE
-fi
-
-# [WM_PROJECT_USER_DIR] - Location of user files
-export WM_PROJECT_USER_DIR=$HOME/$WM_PROJECT/$USER-$WM_PROJECT_VERSION
-
-# Load shell functions
-. $WM_PROJECT_DIR/etc/config.sh/functions
-
-# Override definitions via prefs, with 'other' first so the sys-admin
-# can provide base values independent of WM_PROJECT_SITE
-_foamEtc -mode=o prefs.sh
-_foamEtc -mode=ug prefs.sh
-
-# Evaluate command-line parameters and record settings for later.
-# These can be used to set/unset values, specify additional files etc.
-export FOAM_SETTINGS="$@"
-_foamEval $@
-
-# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH)
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-export PATH MANPATH LD_LIBRARY_PATH
-_foamClean PATH "$foamOldDirs"
-_foamClean MANPATH "$foamOldDirs"
-_foamClean LD_LIBRARY_PATH "$foamOldDirs"
-
-# Setup for OpenFOAM compilation etc
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamEtc -config settings
-
-# Setup for third-party packages
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamEtc -config mpi
-_foamEtc -config paraview -- $@ # Pass through for evaluation
-_foamEtc -config vtk
-_foamEtc -config ensight
-_foamEtc -config gperftools
-## _foamEtc -config ADIOS
-_foamEtc -config CGAL
-_foamEtc -config scotch
-_foamEtc -config FFTW
-
-# Interactive shell
-if /usr/bin/tty -s 2>/dev/null
-then
- _foamEtc -config aliases
- [ "${BASH_VERSINFO:-0}" -ge 4 ] && _foamEtc -config bash_completion
-fi
-
-
-# Clean environment paths again. Only remove duplicates
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-export PATH MANPATH LD_LIBRARY_PATH
-
-_foamClean PATH
-_foamClean MANPATH
-_foamClean LD_LIBRARY_PATH
-
-# Add trailing ':' for system manpages
-if [ -n "$MANPATH" ]
-then
- MANPATH="${MANPATH}:"
-fi
-
-if [ -n "$LD_PRELOAD" ]
-then
- export LD_PRELOAD
- _foamClean LD_PRELOAD
-fi
-
-
-# Cleanup temporary information
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-# Unload shell functions
-. $WM_PROJECT_DIR/etc/config.sh/functions
-
-# Variables (done as the last statement for a clean exit code)
-unset cleaned foamOldDirs
-
-#------------------------------------------------------------------------------
diff --git a/etc/config.csh/compiler b/etc/config.csh/compiler
index 3364100974..ab3cbddc30 100644
--- a/etc/config.csh/compiler
+++ b/etc/config.csh/compiler
@@ -84,6 +84,9 @@ case ThirdParty:
case Clang50:
set clang_version=llvm-5.0.1
breaksw
+ case Clang60:
+ set clang_version=llvm-6.0.0
+ breaksw
default:
/bin/cat << UNKNOWN_COMPILER
===============================================================================
diff --git a/etc/config.sh/compiler b/etc/config.sh/compiler
index a7a9df369c..b3d6acccac 100644
--- a/etc/config.sh/compiler
+++ b/etc/config.sh/compiler
@@ -83,6 +83,9 @@ ThirdParty)
Clang50)
clang_version=llvm-5.0.1
;;
+ Clang60)
+ clang_version=llvm-6.0.0
+ ;;
*)
/bin/cat << UNKNOWN_COMPILER 1>&2
===============================================================================
diff --git a/etc/config.sh/settings.orig b/etc/config.sh/settings.orig
deleted file mode 100644
index 73de9fa681..0000000000
--- a/etc/config.sh/settings.orig
+++ /dev/null
@@ -1,316 +0,0 @@
-#----------------------------------*-sh-*--------------------------------------
-# ========= |
-# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
-# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
-# \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
-#------------------------------------------------------------------------------
-# License
-# This file is part of OpenFOAM, licensed under GNU General Public License
-# .
-#
-# File
-# etc/config.sh/settings
-# - sourced by OpenFOAM-*/etc/bashrc
-#
-# Description
-# Settings for OpenFOAM.
-#
-#------------------------------------------------------------------------------
-export WM_ARCH=$(uname -s) # System name
-: ${WM_OSTYPE:=POSIX}; export WM_OSTYPE # System type (POSIX is default)
-
-# Default compiler = gcc/g++ and C++11
-export WM_CC="gcc"
-export WM_CXX="g++"
-export WM_CFLAGS="-fPIC"
-export WM_CXXFLAGS="-fPIC -std=c++11"
-unset WM_COMPILER_ARCH WM_COMPILER_LIB_ARCH WM_LDFLAGS
-
-# Adjust according to system and architecture
-case "$WM_ARCH" in
-Linux)
- WM_ARCH=linux
-
- case $(uname -m) in
- i686)
- export WM_ARCH_OPTION=32
- ;;
-
- x86_64)
- : ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION # Default to 64-bit
- case "$WM_ARCH_OPTION" in
- 32)
- export WM_COMPILER_ARCH=64
- export WM_CFLAGS="$WM_CFLAGS -m32"
- export WM_CXXFLAGS="$WM_CXXFLAGS -m32"
- export WM_LDFLAGS="-m32"
- ;;
- 64)
- WM_ARCH=linux64
- export WM_COMPILER_LIB_ARCH=64
- export WM_CFLAGS="$WM_CFLAGS -m64"
- export WM_CXXFLAGS="$WM_CXXFLAGS -m64"
- export WM_LDFLAGS="-m64"
- ;;
- *)
- echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32|64" 1>&2
- ;;
- esac
- ;;
-
- ia64)
- WM_ARCH=linuxIA64
- ;;
-
- armv7l)
- WM_ARCH=linuxARM7
- export WM_ARCH_OPTION=32
- export WM_COMPILER_LIB_ARCH=32
- ;;
-
- aarch64)
- WM_ARCH=linuxARM64
- export WM_ARCH_OPTION=64
- export WM_COMPILER_LIB_ARCH=64
- ;;
-
- ppc64)
- WM_ARCH=linuxPPC64
- export WM_COMPILER_LIB_ARCH=64
- export WM_CFLAGS="$WM_CFLAGS -m64"
- export WM_CXXFLAGS="$WM_CXXFLAGS -m64"
- export WM_LDFLAGS="-m64"
- ;;
-
- ppc64le)
- WM_ARCH=linuxPPC64le
- export WM_COMPILER_LIB_ARCH=64
- export WM_CFLAGS="$WM_CFLAGS -m64"
- export WM_CXXFLAGS="$WM_CXXFLAGS -m64"
- export WM_LDFLAGS="-m64"
- ;;
-
- *)
- echo Unknown processor type $(uname -m) for Linux 1>&2
- ;;
- esac
- ;;
-
-SunOS)
- WM_ARCH=SunOS64
- WM_MPLIB=FJMPI
- export WM_COMPILER_LIB_ARCH=64
- export WM_CFLAGS="$WM_CFLAGS -mabi=64"
- export WM_CXXFLAGS="$WM_CXXFLAGS -mabi=64"
- export WM_LDFLAGS="-mabi=64 -G0"
- ;;
-
-*) # An unsupported operating system
- /bin/cat << UNSUPPORTED_OS 1>&2
-===============================================================================
-Your '$WM_ARCH' operating system is unsupported by this OpenFOAM release.
-For further assistance, please contact www.OpenFOAM.com
-===============================================================================
-UNSUPPORTED_OS
- ;;
-esac
-
-#------------------------------------------------------------------------------
-
-# [FOAM_JOB_DIR] - unset is equivalent to ~/.OpenFOAM/jobControl
-## export FOAM_JOB_DIR="$HOME/.OpenFOAM/jobControl"
-
-# wmake configuration
-export WM_DIR=$WM_PROJECT_DIR/wmake
-export WM_LINK_LANGUAGE=c++
-export WM_LABEL_OPTION=Int$WM_LABEL_SIZE
-export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION
-
-# Base executables/libraries
-export FOAM_APPBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
-export FOAM_LIBBIN=$WM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
-
-# External (ThirdParty) libraries
-export FOAM_EXT_LIBBIN=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/lib
-
-# Site-specific (group) files
-if [ -n "$WM_PROJECT_SITE" ]
-then
- siteDir=$WM_PROJECT_SITE
-else
- siteDir=$WM_PROJECT_INST_DIR/site
-fi
-
-# Shared site (group) executables/libraries
-export FOAM_SITE_APPBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/bin
-export FOAM_SITE_LIBBIN=$siteDir/$WM_PROJECT_VERSION/platforms/$WM_OPTIONS/lib
-
-# User executables/libraries
-export FOAM_USER_APPBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/bin
-export FOAM_USER_LIBBIN=$WM_PROJECT_USER_DIR/platforms/$WM_OPTIONS/lib
-
-# [FOAM_CODE_TEMPLATES] - dynamicCode templates
-# * fallback == "foamEtcFile -list codeTemplates/dynamicCode"
-# export FOAM_CODE_TEMPLATES=$WM_PROJECT_DIR/etc/codeTemplates/dynamicCode
-
-# Convenience
-export FOAM_ETC=$WM_PROJECT_DIR/etc
-export FOAM_APP=$WM_PROJECT_DIR/applications
-export FOAM_SRC=$WM_PROJECT_DIR/src
-export FOAM_TUTORIALS=$WM_PROJECT_DIR/tutorials
-export FOAM_UTILITIES=$WM_PROJECT_DIR/applications/utilities
-export FOAM_SOLVERS=$WM_PROJECT_DIR/applications/solvers
-export FOAM_RUN=$WM_PROJECT_USER_DIR/run
-
-# Add wmake to the path - not required for runtime-only environment
-[ -d "$WM_DIR" ] && PATH=$WM_DIR:$PATH
-# Add OpenFOAM scripts to the path
-export PATH=$WM_PROJECT_DIR/bin:$PATH
-
-# Add site-specific scripts to path - only if they exist
-if [ -d "$siteDir/bin" ] # Generic
-then
- _foamAddPath "$siteDir/bin"
-fi
-if [ -d "$siteDir/$WM_PROJECT_VERSION/bin" ] # Version-specific
-then
- _foamAddPath "$siteDir/$WM_PROJECT_VERSION/bin"
-fi
-unset siteDir
-
-_foamAddPath $FOAM_USER_APPBIN:$FOAM_SITE_APPBIN:$FOAM_APPBIN
-_foamAddLib $FOAM_LIBBIN/dummy # Dummy versions of external libraries last
-if [ -n "$FOAM_EXT_LIBBIN" ] # External libraries (allowed to be unset)
-then
- _foamAddLib $FOAM_EXT_LIBBIN
-fi
-_foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN
-
-#------------------------------------------------------------------------------
-
-# Compiler settings
-# ~~~~~~~~~~~~~~~~~
-
-# Default to system compiler
-: ${WM_COMPILER_TYPE:=system}; export WM_COMPILER_TYPE
-
-# Adjust for non-gcc compilers
-case "$WM_COMPILER" in
-Clang*) # Clang compiler suite
- export WM_CC='clang'
- export WM_CXX='clang++'
- ;;
-Cray*) # Cray system compilers
- export WM_CC='cc'
- export WM_CXX='CC'
- ;;
-Icc*) # Intel compilers
- export WM_CC='icc'
- export WM_CXX='icpc'
- ;;
-esac
-
-# Clear prior to sourcing
-unset gcc_version gmp_version mpfr_version mpc_version
-unset GMP_ARCH_PATH MPFR_ARCH_PATH
-
-# Load pre-defined compiler versions
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-_foamEtc -config compiler
-
-# ThirdParty base for compilers
-archDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH
-
-case "$WM_COMPILER_TYPE-$WM_COMPILER" in
-ThirdParty-Gcc*)
- gccDir=$archDir/$gcc_version
- gmpDir=$archDir/${gmp_version:-gmp-system}
- mpfrDir=$archDir/${mpfr_version:-mpfr-system}
- mpcDir=$archDir/${mpc_version:-mpc-system}
-
- # Check that the compiler directory can be found
- [ -d "$gccDir" ] || /bin/cat << GCC_NOT_FOUND 1>&2
-===============================================================================
-Warning in $WM_PROJECT_DIR/etc/config.sh/settings:
-Cannot find '$WM_COMPILER' compiler installation
- $gccDir
-
- Either install this compiler version, or use the system compiler by setting
- WM_COMPILER_TYPE to 'system' in \$WM_PROJECT_DIR/etc/bashrc.
-===============================================================================
-GCC_NOT_FOUND
-
- _foamAddMan $gccDir/man
- _foamAddPath $gccDir/bin
-
- # Add ThirdParty compiler libraries to run-time environment
- _foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
-
- # Add gmp/mpfr/mpc libraries to run-time environment.
- # Require that they exist, automatically find lib64/ or lib/.
- _foamAddLibAuto $gmpDir && \
- export GMP_ARCH_PATH=$gmpDir # For non-system CGAL
-
- _foamAddLibAuto $mpfrDir && \
- export MPFR_ARCH_PATH=$mpfrDir # For non-system CGAL
-
- _foamAddLibAuto $mpcDir
-
- if [ "$FOAM_VERBOSE" -a "$PS1" ]
- then
- echo "Using ThirdParty compiler"
- echo " ${gccDir##*/} (${gmpDir##*/} $${mpfrDir##*/} ${mpcDir##*/})"
- fi
- ;;
-
-ThirdParty-Clang*)
- clangDir=$archDir/$clang_version
-
- # Check that the compiler directory can be found
- [ -d "$clangDir" ] || /bin/cat << CLANG_NOT_FOUND 1>&2
-===============================================================================
-Warning in $WM_PROJECT_DIR/etc/config.sh/settings:
-Cannot find '$WM_COMPILER' compiler installation
- $clangDir
-
- Either install this compiler version, or use the system compiler by setting
- WM_COMPILER_TYPE to 'system' in \$WM_PROJECT_DIR/etc/bashrc.
-===============================================================================
-CLANG_NOT_FOUND
-
- _foamAddMan $clangDir/share/man
- _foamAddPath $clangDir/bin
- _foamAddLib $clangDir/lib # For things like libomp (openmp) etc
-
- if [ "$FOAM_VERBOSE" -a "$PS1" ]
- then
- echo "Using ThirdParty compiler"
- echo " ${clangDir##*/}"
- fi
- ;;
-
-system-* | ThirdParty-*)
- # Using system compiler or other ThirdParty compiler
- ;;
-
-*)
- /bin/cat << UNKNOWN_TYPE 1>&2
-===============================================================================
-Unknown WM_COMPILER_TYPE="$WM_COMPILER_TYPE" - treating as 'system'
-Please check your settings
-===============================================================================
-UNKNOWN_TYPE
- export WM_COMPILER_TYPE=system
- ;;
-
-esac
-
-# Cleanup
-# ~~~~~~~
-unset archDir
-unset gcc_version gccDir
-unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
-unset clang_version clangDir
-
-#------------------------------------------------------------------------------
diff --git a/etc/cshrc b/etc/cshrc
index a6d0c2a1d1..16468edf04 100644
--- a/etc/cshrc
+++ b/etc/cshrc
@@ -58,7 +58,7 @@ setenv WM_COMPILER_TYPE system
# [WM_COMPILER] - Compiler:
# = Gcc | Gcc4[8-9] | Gcc5[1-5] | Gcc6[1-4] | Gcc7[1-3] | GccKNL |
-# Clang | Clang3[8-9] | Clang[45]0 | Icc | IccKNL | Cray | Arm
+# Clang | Clang3[8-9] | Clang[4-6]0 | Icc | IccKNL | Cray | Arm
setenv WM_COMPILER Gcc
# [WM_ARCH_OPTION] - Memory addressing:
diff --git a/wmake/rules/General/Clang/c++ b/wmake/rules/General/Clang/c++
new file mode 100644
index 0000000000..439d4568f9
--- /dev/null
+++ b/wmake/rules/General/Clang/c++
@@ -0,0 +1,19 @@
+SUFFIXES += .C .cc .cpp .cxx
+
+CC = clang++ -std=c++11
+
+ptFLAGS = -DNoRepository -ftemplate-depth-100
+
+# - Standard warnings
+# - Less restrictive warnings (may be needed for flex++, CGAL, etc.)
+
+c++WARN = \
+ -Wall -Wextra -Wold-style-cast \
+ -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
+ -Wno-undefined-var-template \
+ -Wno-unknown-warning-option
+
+c++LESSWARN = \
+ -Wno-old-style-cast -Wno-unused-local-typedefs \
+ -Wno-tautological-undefined-compare -Wno-shift-negative-value \
+ -Wno-null-pointer-arithmetic
diff --git a/wmake/rules/linux64Clang/openmp b/wmake/rules/General/Clang/openmp
similarity index 100%
rename from wmake/rules/linux64Clang/openmp
rename to wmake/rules/General/Clang/openmp
diff --git a/wmake/rules/General/Gcc/c++ b/wmake/rules/General/Gcc/c++
new file mode 100644
index 0000000000..c71ca11687
--- /dev/null
+++ b/wmake/rules/General/Gcc/c++
@@ -0,0 +1,17 @@
+SUFFIXES += .C .cc .cpp .cxx
+
+CC = g++ -std=c++11
+
+ptFLAGS = -DNoRepository -ftemplate-depth-100
+
+# - Standard warnings
+# - Less restrictive warnings (may be needed for flex++, CGAL, etc.)
+
+c++WARN = \
+ -Wall -Wextra -Wold-style-cast \
+ -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
+ -Wno-attributes -Wno-unknown-pragmas
+
+c++LESSWARN = \
+ -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds \
+ -fpermissive
diff --git a/wmake/rules/linux64Cray/openmp b/wmake/rules/General/Gcc/openmp
similarity index 100%
rename from wmake/rules/linux64Cray/openmp
rename to wmake/rules/General/Gcc/openmp
diff --git a/wmake/rules/General/Icc/c++ b/wmake/rules/General/Icc/c++
new file mode 100644
index 0000000000..f42e81c2ce
--- /dev/null
+++ b/wmake/rules/General/Icc/c++
@@ -0,0 +1,17 @@
+SUFFIXES += .C .cc .cpp .cxx
+
+CC = icpc -std=c++11
+
+ptFLAGS = -DNoRepository
+
+# - Standard warnings
+# - Less restrictive warnings (may be needed for flex++, CGAL, etc.).
+
+c++WARN = \
+ -Wall -Wextra \
+ -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
+ -Wno-unknown-pragmas \
+ -diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076
+
+c++LESSWARN = \
+ -diag-disable 1224,2026,2305
diff --git a/wmake/rules/linux64Icc/openmp b/wmake/rules/General/Icc/openmp
similarity index 100%
rename from wmake/rules/linux64Icc/openmp
rename to wmake/rules/General/Icc/openmp
diff --git a/wmake/rules/linux64Clang/c b/wmake/rules/linux64Clang/c
index 36f40bc364..74f30f2456 100644
--- a/wmake/rules/linux64Clang/c
+++ b/wmake/rules/linux64Clang/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = clang -m64
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linux64Clang/c++ b/wmake/rules/linux64Clang/c++
index 48c4f1124d..e9ff2ac04d 100644
--- a/wmake/rules/linux64Clang/c++
+++ b/wmake/rules/linux64Clang/c++
@@ -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 = clang++ -std=c++11 -m64
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 $@
diff --git a/wmake/rules/linux64Clang/general b/wmake/rules/linux64Clang/general
index d83a18b000..9ada28972d 100644
--- a/wmake/rules/linux64Clang/general
+++ b/wmake/rules/linux64Clang/general
@@ -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++
diff --git a/wmake/rules/linux64Cray/c b/wmake/rules/linux64Cray/c
index a3e304ed80..d0937d43b8 100644
--- a/wmake/rules/linux64Cray/c
+++ b/wmake/rules/linux64Cray/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = cc -m64
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linux64Cray/c++ b/wmake/rules/linux64Cray/c++
index 30c2bc762e..acac32e84f 100644
--- a/wmake/rules/linux64Cray/c++
+++ b/wmake/rules/linux64Cray/c++
@@ -1,16 +1,9 @@
-SUFFIXES += .C
-
-c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
-
-# Suppress some warnings for flex++ and CGAL
-c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
+include $(GENERAL_RULES)/Gcc/c++
CC = CC -std=c++11 -m64
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 $@
diff --git a/wmake/rules/linux64Cray/general b/wmake/rules/linux64Cray/general
index a0c807e5d8..f8a6558ce7 100644
--- a/wmake/rules/linux64Cray/general
+++ b/wmake/rules/linux64Cray/general
@@ -3,7 +3,7 @@ CPP = cpp -traditional-cpp $(GFLAGS)
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++
diff --git a/wmake/rules/linux64Gcc/c b/wmake/rules/linux64Gcc/c
index 56b9e8ff72..99886ffc02 100644
--- a/wmake/rules/linux64Gcc/c
+++ b/wmake/rules/linux64Gcc/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = gcc -m64
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++
index b8b0925474..22c4d47b0b 100644
--- a/wmake/rules/linux64Gcc/c++
+++ b/wmake/rules/linux64Gcc/c++
@@ -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 -m64
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 $@
diff --git a/wmake/rules/linux64Gcc/general b/wmake/rules/linux64Gcc/general
index d83a18b000..e510b17575 100644
--- a/wmake/rules/linux64Gcc/general
+++ b/wmake/rules/linux64Gcc/general
@@ -3,7 +3,7 @@ CPP = cpp -traditional-cpp $(GFLAGS)
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++
diff --git a/wmake/rules/linux64Gcc/openmp b/wmake/rules/linux64Gcc/openmp
deleted file mode 100644
index cd007d1529..0000000000
--- a/wmake/rules/linux64Gcc/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linux64GccKNL/c b/wmake/rules/linux64GccKNL/c
index db0bbc58f9..2650cf5649 100644
--- a/wmake/rules/linux64GccKNL/c
+++ b/wmake/rules/linux64GccKNL/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = gcc -m64 -march=knl
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linux64GccKNL/c++ b/wmake/rules/linux64GccKNL/c++
index 426e87709a..f0f435482c 100644
--- a/wmake/rules/linux64GccKNL/c++
+++ b/wmake/rules/linux64GccKNL/c++
@@ -1,19 +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
-
-# 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 -m64 -march=knl
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 $@
diff --git a/wmake/rules/linux64GccKNL/general b/wmake/rules/linux64GccKNL/general
index d83a18b000..e510b17575 100644
--- a/wmake/rules/linux64GccKNL/general
+++ b/wmake/rules/linux64GccKNL/general
@@ -3,7 +3,7 @@ CPP = cpp -traditional-cpp $(GFLAGS)
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++
diff --git a/wmake/rules/linux64GccKNL/openmp b/wmake/rules/linux64GccKNL/openmp
deleted file mode 100644
index cd007d1529..0000000000
--- a/wmake/rules/linux64GccKNL/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linux64Icc/c b/wmake/rules/linux64Icc/c
index c405b37e24..920341c2fb 100644
--- a/wmake/rules/linux64Icc/c
+++ b/wmake/rules/linux64Icc/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN =
-
cc = icc
+cWARN =
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linux64Icc/c++ b/wmake/rules/linux64Icc/c++
index e40c331342..b783705543 100644
--- a/wmake/rules/linux64Icc/c++
+++ b/wmake/rules/linux64Icc/c++
@@ -1,17 +1,9 @@
-SUFFIXES += .C .cc .cpp .cxx
-
-c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-unknown-pragmas \
- -diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076
-
-# Suppress some warnings for flex++ and CGAL
-c++LESSWARN = -diag-disable 1224,2026,2305
+include $(GENERAL_RULES)/Icc/c++
CC = icpc -std=c++11 -fp-trap=common -fp-model precise
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
-ptFLAGS = -DNoRepository
-
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
diff --git a/wmake/rules/linux64Icc/general b/wmake/rules/linux64Icc/general
index eb3898f709..0d41c462f2 100644
--- a/wmake/rules/linux64Icc/general
+++ b/wmake/rules/linux64Icc/general
@@ -3,7 +3,7 @@ CPP = /lib/cpp -traditional-cpp $(GFLAGS)
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
+include $(GENERAL_RULES)/Icc/openmp
-include $(DEFAULT_RULES)/openmp
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linux64IccKNL/c b/wmake/rules/linux64IccKNL/c
index c405b37e24..920341c2fb 100644
--- a/wmake/rules/linux64IccKNL/c
+++ b/wmake/rules/linux64IccKNL/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN =
-
cc = icc
+cWARN =
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linux64IccKNL/c++ b/wmake/rules/linux64IccKNL/c++
index 4196ede55e..0c85ccf8e9 100644
--- a/wmake/rules/linux64IccKNL/c++
+++ b/wmake/rules/linux64IccKNL/c++
@@ -1,16 +1,18 @@
-SUFFIXES += .C .cc .cpp .cxx
-
-c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-unknown-pragmas \
- -diag-disable 654,1125,1292,2304
-
-# Suppress some warnings for flex++ and CGAL
-c++LESSWARN = -diag-disable 1224,2026,2305
+include $(GENERAL_RULES)/Icc/c++
CC = icpc -std=c++11 -xmic-avx512 -fp-trap=common -fp-model precise -fp-speculation=safe
-include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
+# Verify if -diag-disable should really be different that the general version
+# or was previously simply not kept updated (MAR-2018)
-ptFLAGS = -DNoRepository
+c++WARN = \
+ -Wall -Wextra \
+ -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
+ -Wno-unknown-pragmas \
+ -diag-disable 654,1125,1292,2304
+#
+
+include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linux64IccKNL/openmp b/wmake/rules/linux64IccKNL/openmp
deleted file mode 100644
index 738673ca91..0000000000
--- a/wmake/rules/linux64IccKNL/openmp
+++ /dev/null
@@ -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 -qopenmp
-LINK_OPENMP = -liomp5
diff --git a/wmake/rules/linuxARM64Arm/c b/wmake/rules/linuxARM64Arm/c
index caf379353c..91a1e739af 100644
--- a/wmake/rules/linuxARM64Arm/c
+++ b/wmake/rules/linuxARM64Arm/c
@@ -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
diff --git a/wmake/rules/linuxARM64Arm/c++ b/wmake/rules/linuxARM64Arm/c++
index bd08dccd61..5704e839a9 100644
--- a/wmake/rules/linuxARM64Arm/c++
+++ b/wmake/rules/linuxARM64Arm/c++
@@ -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 $@
diff --git a/wmake/rules/linuxARM64Arm/general b/wmake/rules/linuxARM64Arm/general
index d83a18b000..9ada28972d 100644
--- a/wmake/rules/linuxARM64Arm/general
+++ b/wmake/rules/linuxARM64Arm/general
@@ -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++
diff --git a/wmake/rules/linuxARM64Arm/openmp b/wmake/rules/linuxARM64Arm/openmp
deleted file mode 100644
index 070a2c5d3a..0000000000
--- a/wmake/rules/linuxARM64Arm/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linuxARM64Clang/c b/wmake/rules/linuxARM64Clang/c
index 7a1e43e377..7e05a427c8 100644
--- a/wmake/rules/linuxARM64Clang/c
+++ b/wmake/rules/linuxARM64Clang/c
@@ -1,10 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
-## cc = clang -m64
cc = clang
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linuxARM64Clang/c++ b/wmake/rules/linuxARM64Clang/c++
index caa4e7ee05..2e9bce109a 100644
--- a/wmake/rules/linuxARM64Clang/c++
+++ b/wmake/rules/linuxARM64Clang/c++
@@ -1,23 +1,9 @@
-SUFFIXES += .C .cc .cpp .cxx
+include $(GENERAL_RULES)/Clang/c++
-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
-
-## CC = clang++ -std=c++11 -m64
CC = clang++ -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 $@
diff --git a/wmake/rules/linuxARM64Clang/general b/wmake/rules/linuxARM64Clang/general
index d83a18b000..9ada28972d 100644
--- a/wmake/rules/linuxARM64Clang/general
+++ b/wmake/rules/linuxARM64Clang/general
@@ -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++
diff --git a/wmake/rules/linuxARM64Clang/openmp b/wmake/rules/linuxARM64Clang/openmp
deleted file mode 100644
index 070a2c5d3a..0000000000
--- a/wmake/rules/linuxARM64Clang/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linuxARM64Gcc/c b/wmake/rules/linuxARM64Gcc/c
index 3ee7538cbb..6845d94483 100644
--- a/wmake/rules/linuxARM64Gcc/c
+++ b/wmake/rules/linuxARM64Gcc/c
@@ -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
diff --git a/wmake/rules/linuxARM64Gcc/c++ b/wmake/rules/linuxARM64Gcc/c++
index f82fe199bb..00a88b07a1 100644
--- a/wmake/rules/linuxARM64Gcc/c++
+++ b/wmake/rules/linuxARM64Gcc/c++
@@ -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 $@
diff --git a/wmake/rules/linuxARM64Gcc/general b/wmake/rules/linuxARM64Gcc/general
index 86f567e61d..fad7e3b14d 100644
--- a/wmake/rules/linuxARM64Gcc/general
+++ b/wmake/rules/linuxARM64Gcc/general
@@ -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++
diff --git a/wmake/rules/linuxARM64Gcc/openmp b/wmake/rules/linuxARM64Gcc/openmp
deleted file mode 100644
index cd007d1529..0000000000
--- a/wmake/rules/linuxARM64Gcc/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linuxARM7Gcc/c b/wmake/rules/linuxARM7Gcc/c
index 3ee7538cbb..6845d94483 100644
--- a/wmake/rules/linuxARM7Gcc/c
+++ b/wmake/rules/linuxARM7Gcc/c
@@ -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
diff --git a/wmake/rules/linuxARM7Gcc/c++ b/wmake/rules/linuxARM7Gcc/c++
index f82fe199bb..00a88b07a1 100644
--- a/wmake/rules/linuxARM7Gcc/c++
+++ b/wmake/rules/linuxARM7Gcc/c++
@@ -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 $@
diff --git a/wmake/rules/linuxARM7Gcc/general b/wmake/rules/linuxARM7Gcc/general
index 4fc50267ed..c56a7353ca 100644
--- a/wmake/rules/linuxARM7Gcc/general
+++ b/wmake/rules/linuxARM7Gcc/general
@@ -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++
diff --git a/wmake/rules/linuxARM7Gcc/openmp b/wmake/rules/linuxARM7Gcc/openmp
deleted file mode 100644
index cd007d1529..0000000000
--- a/wmake/rules/linuxARM7Gcc/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linuxClang/c b/wmake/rules/linuxClang/c
index 59cf476f0e..7cc1b56a06 100644
--- a/wmake/rules/linuxClang/c
+++ b/wmake/rules/linuxClang/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = clang -m32
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linuxClang/c++ b/wmake/rules/linuxClang/c++
index 8100f860a4..f5e87a0c17 100644
--- a/wmake/rules/linuxClang/c++
+++ b/wmake/rules/linuxClang/c++
@@ -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 = clang++ -std=c++11 -m32
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 $@
diff --git a/wmake/rules/linuxClang/general b/wmake/rules/linuxClang/general
index eae23e305b..04529b376a 100644
--- a/wmake/rules/linuxClang/general
+++ b/wmake/rules/linuxClang/general
@@ -4,7 +4,7 @@ LD = ld -melf_i386
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++
diff --git a/wmake/rules/linuxClang/openmp b/wmake/rules/linuxClang/openmp
deleted file mode 100644
index 070a2c5d3a..0000000000
--- a/wmake/rules/linuxClang/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linuxGcc/c b/wmake/rules/linuxGcc/c
index 5450517cee..71dc037e4d 100644
--- a/wmake/rules/linuxGcc/c
+++ b/wmake/rules/linuxGcc/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = gcc -m32
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linuxGcc/c++ b/wmake/rules/linuxGcc/c++
index c6cb38c1be..4566aa9bda 100644
--- a/wmake/rules/linuxGcc/c++
+++ b/wmake/rules/linuxGcc/c++
@@ -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 -m32
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 $@
diff --git a/wmake/rules/linuxGcc/general b/wmake/rules/linuxGcc/general
index eae23e305b..f52d4b26a9 100644
--- a/wmake/rules/linuxGcc/general
+++ b/wmake/rules/linuxGcc/general
@@ -4,7 +4,7 @@ LD = ld -melf_i386
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++
diff --git a/wmake/rules/linuxGcc/openmp b/wmake/rules/linuxGcc/openmp
deleted file mode 100644
index cd007d1529..0000000000
--- a/wmake/rules/linuxGcc/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linuxIA64Gcc/c b/wmake/rules/linuxIA64Gcc/c
index 3ee7538cbb..6845d94483 100644
--- a/wmake/rules/linuxIA64Gcc/c
+++ b/wmake/rules/linuxIA64Gcc/c
@@ -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
diff --git a/wmake/rules/linuxIA64Gcc/c++ b/wmake/rules/linuxIA64Gcc/c++
index 37b0b6b1d3..68329d01a3 100644
--- a/wmake/rules/linuxIA64Gcc/c++
+++ b/wmake/rules/linuxIA64Gcc/c++
@@ -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 $@
diff --git a/wmake/rules/linuxIA64Gcc/general b/wmake/rules/linuxIA64Gcc/general
index d8fb470836..3c8d2d7f61 100644
--- a/wmake/rules/linuxIA64Gcc/general
+++ b/wmake/rules/linuxIA64Gcc/general
@@ -3,8 +3,8 @@ CPP = cpp -traditional-cpp $(GFLAGS)
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
+include $(GENERAL_RULES)/Gcc/openmp
-include $(DEFAULT_RULES)/openmp
include $(DEFAULT_RULES)/X
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxIA64Gcc/openmp b/wmake/rules/linuxIA64Gcc/openmp
deleted file mode 100644
index cd007d1529..0000000000
--- a/wmake/rules/linuxIA64Gcc/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linuxIA64Icc/c b/wmake/rules/linuxIA64Icc/c
index 2d8cda5910..a53630671c 100644
--- a/wmake/rules/linuxIA64Icc/c
+++ b/wmake/rules/linuxIA64Icc/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN =
-
cc = icc
+cWARN =
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linuxIA64Icc/c++ b/wmake/rules/linuxIA64Icc/c++
index cf9d7524d2..8fce549e21 100644
--- a/wmake/rules/linuxIA64Icc/c++
+++ b/wmake/rules/linuxIA64Icc/c++
@@ -1,17 +1,9 @@
-SUFFIXES += .C .cc .cpp .cxx
-
-c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-unknown-pragmas \
- -diag-disable 2304,1292
-
-# Suppress some warnings for flex++ and CGAL
-c++LESSWARN = -diag-disable 1224,2026,2305
+include $(GENERAL_RULES)/Icc/c++
CC = icpc -std=c++11
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
-ptFLAGS = -DNoRepository
-
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
diff --git a/wmake/rules/linuxIA64Icc/general b/wmake/rules/linuxIA64Icc/general
index c3269860fb..eee8f6f694 100644
--- a/wmake/rules/linuxIA64Icc/general
+++ b/wmake/rules/linuxIA64Icc/general
@@ -3,8 +3,8 @@ CPP = /lib/cpp -traditional-cpp $(GFLAGS) -DICC_IA64_PREFETCH
GLIBS =
include $(GENERAL_RULES)/standard
+include $(GENERAL_RULES)/Icc/openmp
-include $(DEFAULT_RULES)/openmp
include $(DEFAULT_RULES)/X
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxIA64Icc/openmp b/wmake/rules/linuxIA64Icc/openmp
deleted file mode 100644
index 738673ca91..0000000000
--- a/wmake/rules/linuxIA64Icc/openmp
+++ /dev/null
@@ -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 -qopenmp
-LINK_OPENMP = -liomp5
diff --git a/wmake/rules/linuxIcc/c b/wmake/rules/linuxIcc/c
index e3c578ae15..b6fe8d4687 100644
--- a/wmake/rules/linuxIcc/c
+++ b/wmake/rules/linuxIcc/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN =
-
cc = icc -gcc-version=400
+cWARN =
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -KPIC
diff --git a/wmake/rules/linuxIcc/c++ b/wmake/rules/linuxIcc/c++
index 1cbe27f9ef..3cab0fd07a 100644
--- a/wmake/rules/linuxIcc/c++
+++ b/wmake/rules/linuxIcc/c++
@@ -1,17 +1,9 @@
-SUFFIXES += .C .cc .cpp .cxx
-
-c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-unknown-pragmas \
- -diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076
-
-# Suppress some warnings for flex++ and CGAL
-c++LESSWARN = -diag-disable 1224,2026,2305
+include $(GENERAL_RULES)/Icc/c++
CC = icpc -std=c++11 -fp-trap=common -fp-model precise
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
-ptFLAGS = -DNoRepository
-
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -KPIC
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $< -o $@
diff --git a/wmake/rules/linuxIcc/general b/wmake/rules/linuxIcc/general
index 85f5be51c0..615ceefae2 100644
--- a/wmake/rules/linuxIcc/general
+++ b/wmake/rules/linuxIcc/general
@@ -4,7 +4,7 @@ LD = ld -melf_i386
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
+include $(GENERAL_RULES)/Icc/openmp
-include $(DEFAULT_RULES)/openmp
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxPPC64Gcc/c b/wmake/rules/linuxPPC64Gcc/c
index dce6cc7466..12f9165e04 100644
--- a/wmake/rules/linuxPPC64Gcc/c
+++ b/wmake/rules/linuxPPC64Gcc/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = gcc -m64 -mcpu=power5+
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linuxPPC64Gcc/c++ b/wmake/rules/linuxPPC64Gcc/c++
index e3f3d39986..161b9ff196 100644
--- a/wmake/rules/linuxPPC64Gcc/c++
+++ b/wmake/rules/linuxPPC64Gcc/c++
@@ -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 -m64 -mcpu=power5+
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 $@
diff --git a/wmake/rules/linuxPPC64Gcc/general b/wmake/rules/linuxPPC64Gcc/general
index 712516c268..6648c16621 100644
--- a/wmake/rules/linuxPPC64Gcc/general
+++ b/wmake/rules/linuxPPC64Gcc/general
@@ -4,8 +4,8 @@ LD = ld -m elf64ppc
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
+include $(GENERAL_RULES)/Gcc/openmp
-include $(DEFAULT_RULES)/openmp
include $(DEFAULT_RULES)/X
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxPPC64Gcc/openmp b/wmake/rules/linuxPPC64Gcc/openmp
deleted file mode 100644
index cd007d1529..0000000000
--- a/wmake/rules/linuxPPC64Gcc/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/linuxPPC64leGcc/c b/wmake/rules/linuxPPC64leGcc/c
index ec88f47627..b486b3ade5 100644
--- a/wmake/rules/linuxPPC64leGcc/c
+++ b/wmake/rules/linuxPPC64leGcc/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = gcc -m64 -mcpu=power8
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/linuxPPC64leGcc/c++ b/wmake/rules/linuxPPC64leGcc/c++
index c1bd365f26..1dab734831 100644
--- a/wmake/rules/linuxPPC64leGcc/c++
+++ b/wmake/rules/linuxPPC64leGcc/c++
@@ -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 -m64 -mcpu=power8
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 $@
diff --git a/wmake/rules/linuxPPC64leGcc/general b/wmake/rules/linuxPPC64leGcc/general
index 575cadaeee..567c0cee83 100644
--- a/wmake/rules/linuxPPC64leGcc/general
+++ b/wmake/rules/linuxPPC64leGcc/general
@@ -4,8 +4,8 @@ LD = ld -m elf64lppc
PROJECT_LIBS = -l$(WM_PROJECT) -ldl
include $(GENERAL_RULES)/standard
+include $(GENERAL_RULES)/Gcc/openmp
-include $(DEFAULT_RULES)/openmp
include $(DEFAULT_RULES)/X
include $(DEFAULT_RULES)/c
include $(DEFAULT_RULES)/c++
diff --git a/wmake/rules/linuxPPC64leGcc/openmp b/wmake/rules/linuxPPC64leGcc/openmp
deleted file mode 100644
index cd007d1529..0000000000
--- a/wmake/rules/linuxPPC64leGcc/openmp
+++ /dev/null
@@ -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
diff --git a/wmake/rules/solaris64Gcc/c b/wmake/rules/solaris64Gcc/c
index 1097b3a594..99886ffc02 100644
--- a/wmake/rules/solaris64Gcc/c
+++ b/wmake/rules/solaris64Gcc/c
@@ -1,9 +1,9 @@
SUFFIXES += .c
-cWARN = -Wall
-
cc = gcc -m64
+cWARN = -Wall
+
include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
diff --git a/wmake/rules/solaris64Gcc/c++ b/wmake/rules/solaris64Gcc/c++
index 12c24492af..03e45effb0 100644
--- a/wmake/rules/solaris64Gcc/c++
+++ b/wmake/rules/solaris64Gcc/c++
@@ -1,18 +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 =
+include $(GENERAL_RULES)/Gcc/c++
CC = g++ -std=c++11 -m64
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 $@
diff --git a/wmake/rules/solarisGcc/c b/wmake/rules/solarisGcc/c
index dfae4adda0..6845d94483 100644
--- a/wmake/rules/solarisGcc/c
+++ b/wmake/rules/solarisGcc/c
@@ -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
diff --git a/wmake/rules/solarisGcc/c++ b/wmake/rules/solarisGcc/c++
index bd58d4af46..68329d01a3 100644
--- a/wmake/rules/solarisGcc/c++
+++ b/wmake/rules/solarisGcc/c++
@@ -1,18 +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 =
+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 $@