diff --git a/etc/bashrc b/etc/bashrc index df02f948af543077e4a18abdf691bedc03307997..65ee7c61f95fbb7bea7bffe29875981a78730bbf 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 4311e4781a0229de62fc0c4ee9f126fb37453918..0000000000000000000000000000000000000000 --- 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 -# <http://www.gnu.org/licenses/>. -# -# 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 <prefs.sh> 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 <prefs.sh> 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 33641009744c142dc654d9270ba4e79868d2f06b..ab3cbddc305c2ffd118e6e137a9b10def98b1ff9 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 a7a9df369c72d1b83c09bee98819a7b12e94e037..b3d6acccac671c2dcec40aaa03dfccbbcf85b0af 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 73de9fa6811e0800a60ea4c0bc1fe5d08bced312..0000000000000000000000000000000000000000 --- 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 -# <http://www.gnu.org/licenses/>. -# -# 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 a6d0c2a1d164cc555c810753c8550d316f73c1ab..16468edf04f9aefca5f45e19f2b42fc577b90ddc 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 0000000000000000000000000000000000000000..439d4568f9a508dd2e15cf6b3c548463fa1957ec --- /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 0000000000000000000000000000000000000000..c71ca11687520dced619a77e1cd3cbd0c51e09bc --- /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 0000000000000000000000000000000000000000..f42e81c2cefcc1798ab358cab75ed03461cad45c --- /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 36f40bc36402ec824abe58ea59d26f882dca26ef..74f30f24566e0c2484213e5bf79c97672510bef5 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 48c4f1124dc057e6a627f8725cae57a814681809..e9ff2ac04da9db0b4c79874de285e2049011e950 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 d83a18b000b3bb3e663ccee8efa77439d863c39d..9ada28972dd83cfd9d1bc2ef8eb7dde9fa4e099f 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 a3e304ed804fdb11e3ea73ab4177f33f128ce971..d0937d43b8808187dd2ab7d71e21bc36323fa09a 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 30c2bc762e23a9651ba54620c3c955ac31d38e28..acac32e84f70279cc89ff38fb1b4b5d738a373f9 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 a0c807e5d8a95848f20457716565c8debe747570..f8a6558ce7c2ed2f56d40815e6296c0e4205e1a0 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 56b9e8ff72a582d8ef75649d772362f2c5200bca..99886ffc02034df2e408d8983e3d53ef41d326fe 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 b8b0925474b0078e020ae44d5979b027792b4312..22c4d47b0be5901d68e762c259a495ef7dda867d 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 d83a18b000b3bb3e663ccee8efa77439d863c39d..e510b17575c57ed491889f7450f32aea14a38025 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 cd007d152913387c2d85d48b65478cbcff769b71..0000000000000000000000000000000000000000 --- 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 db0bbc58f915e631763905f588975649a21bbc56..2650cf564961da08920a4ef59547ea4b1c39af71 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 426e87709a2d7433aaf4bfb92aead5e98e8dde2b..f0f435482cc77fd70e1fddc3d42ac2d1f14b13aa 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 d83a18b000b3bb3e663ccee8efa77439d863c39d..e510b17575c57ed491889f7450f32aea14a38025 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 cd007d152913387c2d85d48b65478cbcff769b71..0000000000000000000000000000000000000000 --- 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 c405b37e24e12fb6bcc44dc0d5004ba1427f2c5e..920341c2fbfc953188356ff814369b164f8d8c37 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 e40c331342341bd1b1f79e486be8142242670e05..b7837055435ce74b7e3ecfa4b99cb48f84955b76 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 eb3898f709eb247f990ab1c0911dac0742e3b19d..0d41c462f2b2f06a2a788164ac473554b3a2ef6a 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 c405b37e24e12fb6bcc44dc0d5004ba1427f2c5e..920341c2fbfc953188356ff814369b164f8d8c37 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 4196ede55e627ff3f42c4b3cd3951467724967d3..0c85ccf8e946f6a4965fab4684eb37c24cc76813 100644 --- a/wmake/rules/linux64IccKNL/c++ +++ b/wmake/rules/linux64IccKNL/c++ @@ -1,17 +1,19 @@ -SUFFIXES += .C .cc .cpp .cxx +include $(GENERAL_RULES)/Icc/c++ -c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-unknown-pragmas \ - -diag-disable 654,1125,1292,2304 +CC = icpc -std=c++11 -xmic-avx512 -fp-trap=common -fp-model precise -fp-speculation=safe -# Suppress some warnings for flex++ and CGAL -c++LESSWARN = -diag-disable 1224,2026,2305 +# Verify if -diag-disable should really be different that the general version +# or was previously simply not kept updated (MAR-2018) -CC = icpc -std=c++11 -xmic-avx512 -fp-trap=common -fp-model precise -fp-speculation=safe +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) -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/linux64IccKNL/openmp b/wmake/rules/linux64IccKNL/openmp deleted file mode 100644 index 738673ca91cc2f2f3f4e4e44cba92db23858d469..0000000000000000000000000000000000000000 --- 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 caf379353ceb2b962ad821f7ac0ac176df472d64..91a1e739afdfc1596b33a83a8d6a17d281d8beca 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 bd08dccd6184fce1c88856a854026d3581b1a91d..5704e839a9b9edbeeaf92675661b79b937716c72 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 d83a18b000b3bb3e663ccee8efa77439d863c39d..9ada28972dd83cfd9d1bc2ef8eb7dde9fa4e099f 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 070a2c5d3ad0b2ef0b54b458bffa78b8ac915812..0000000000000000000000000000000000000000 --- 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 7a1e43e3779042cd6c3b66b0e7276ca84a0a7124..7e05a427c8c90a9b42123c41559d42b817ba13d2 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 caa4e7ee05cd7c5362ba210141b6cfeda457c999..2e9bce109a8ea88f1ab6b92848a1b4013411b00f 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 d83a18b000b3bb3e663ccee8efa77439d863c39d..9ada28972dd83cfd9d1bc2ef8eb7dde9fa4e099f 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 070a2c5d3ad0b2ef0b54b458bffa78b8ac915812..0000000000000000000000000000000000000000 --- 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 3ee7538cbb1808ebc79ed2f5dfa61e82354c8024..6845d94483ae7de89f1106267bb220ca500a24a1 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 f82fe199bb27c727471d2804ef45aac50546217a..00a88b07a16c4ec1856fd30302d542fa7ba2404c 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 86f567e61d83637e3688f49bd486ed0a31495802..fad7e3b14df5091370d93a6a83fdc261faefb5bb 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 cd007d152913387c2d85d48b65478cbcff769b71..0000000000000000000000000000000000000000 --- 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 3ee7538cbb1808ebc79ed2f5dfa61e82354c8024..6845d94483ae7de89f1106267bb220ca500a24a1 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 f82fe199bb27c727471d2804ef45aac50546217a..00a88b07a16c4ec1856fd30302d542fa7ba2404c 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 4fc50267edbaa5c8c846891dc70fe93f09b5944c..c56a7353ca5008c6c86829b180055e4d7b19ec41 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 cd007d152913387c2d85d48b65478cbcff769b71..0000000000000000000000000000000000000000 --- 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 59cf476f0ee15861fe244bb18a647bf67b3fc03f..7cc1b56a060f1c6910c2b0f01d15b9603f7d9c49 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 8100f860a482b9ee9d746a97462d810386e454d8..f5e87a0c17a17d3a6958d496cf930ba713545ba3 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 eae23e305bdd3331475a0d51ad5fa727144608c0..04529b376a023a02d27a81cde3aec16717d2f117 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 070a2c5d3ad0b2ef0b54b458bffa78b8ac915812..0000000000000000000000000000000000000000 --- 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 5450517cee44c2932a8e7b6ac5fae25a43f37c1e..71dc037e4df668a2d8a23a8d6a43d3725f2be7eb 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 c6cb38c1bed9376a057e2ddf0d352b90b2534038..4566aa9bda55647308cd7aa4dc3988ed286cbdce 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 eae23e305bdd3331475a0d51ad5fa727144608c0..f52d4b26a9dc18de90b4b439d14b5d01a376fd8f 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 cd007d152913387c2d85d48b65478cbcff769b71..0000000000000000000000000000000000000000 --- 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 3ee7538cbb1808ebc79ed2f5dfa61e82354c8024..6845d94483ae7de89f1106267bb220ca500a24a1 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 37b0b6b1d3a251531543128c3739f35a131f5a37..68329d01a37419d4803745d50211aa498360dd8d 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 d8fb470836e8d2469fb42414aeecf3dd06c7eda3..3c8d2d7f6192b652d98089200bf2ac714f52dd05 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 cd007d152913387c2d85d48b65478cbcff769b71..0000000000000000000000000000000000000000 --- 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 2d8cda5910817d3311d5e1fd8440a926d6f99772..a53630671c2bb3e6242dfc928840c799c692e66e 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 cf9d7524d23faa27a8377b4f6a5f01b38e5d796f..8fce549e21db315b85318fec8f68329fcecfe9cb 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 c3269860fb89a538b25faeec8ba66c5ea6183a55..eee8f6f694887dc01b44512c2fd4516b4119511a 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 738673ca91cc2f2f3f4e4e44cba92db23858d469..0000000000000000000000000000000000000000 --- 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 e3c578ae159d78bdf1ea1ccf0fa1d3ad23126017..b6fe8d4687bd002c62c7836fe13365f7965e62bd 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 1cbe27f9efc6464c0c352ac9af95e4aeaeb94718..3cab0fd07a28f793fc4b2147de065c91d04d72d0 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 85f5be51c0992097b1593c56b86310b260fe0ee8..615ceefae22d29b3b8ce7f7596fb877db49d245b 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 dce6cc7466d3db282227acf5b7536bcc51e25c43..12f9165e04c97750c01d572b085c8e93336beeab 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 e3f3d39986910cfcf198bc852b783efcac28c900..161b9ff1967f550679348fa974bfc4f95b76d0f6 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 712516c2681a53c10d1d3ad26614fd65fe20317f..6648c1662150defe0f768d4460f3a70292e15103 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 cd007d152913387c2d85d48b65478cbcff769b71..0000000000000000000000000000000000000000 --- 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 ec88f476277ecf29be4d96041334b46727771a93..b486b3ade5c0a07e59b9e513e497a99f15017cf0 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 c1bd365f26706ebcb1ef9f5b047a81d9086dd6b9..1dab734831537c971d1bbc0d7f2607d866eae04b 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 575cadaeee00313894af62de0bd85a1661cf22db..567c0cee834bbbcc0dcff04e7b965f66dc0f36e3 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 cd007d152913387c2d85d48b65478cbcff769b71..0000000000000000000000000000000000000000 --- 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 1097b3a594ca9284537cc5af2b8248bb8bac4486..99886ffc02034df2e408d8983e3d53ef41d326fe 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 12c24492af7588d7b92840ee5c10b5b4cf5ff3c0..03e45effb0921b1912bda38f85509e086a4f83c1 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 dfae4adda0547faeae8333ed5e2660a3bacd7be7..6845d94483ae7de89f1106267bb220ca500a24a1 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 bd58d4af4649a58efc5f5b6bc005cf2f1d18c2dd..68329d01a37419d4803745d50211aa498360dd8d 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 $@