diff --git a/Allwmake b/Allwmake index 5464cf3..c613104 100755 --- a/Allwmake +++ b/Allwmake @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -21,9 +21,6 @@ # ---------------------------------------------- # NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE #------------------------------------------------------------------------------ -# Dynamic library endings (default is .so) -[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so - # Run from third-party directory only cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || { echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR" @@ -62,6 +59,8 @@ echo echo ======================================== echo Start ThirdParty Allwmake echo ======================================== +echo "using: $CC $CFLAGS" +echo "using: $CXX $CXXFLAGS" echo echo ======================================== echo Build MPI libraries if required @@ -94,14 +93,20 @@ echo " $SCOTCH_ARCH_PATH" SCOTCH_SOURCE_DIR=$sourceBASE/$SCOTCH_VERSION # Needs generalizing, but works fairly well -scotchMakefile=etc/makeFiles/scotch/Makefile.inc.OpenFOAM-"$(uname -s)".shlib +for scotchMakefile in \ + "OpenFOAM-$(uname -s)-${WM_COMPILER}.shlib" \ + "OpenFOAM-$(uname -s).shlib" \ + OpenFOAM-Linux.shlib \ +; +do + scotchMakefile="etc/makeFiles/scotch/Makefile.inc.$scotchMakefile" + [ -f "$scotchMakefile" ] && break +done -[ -f $scotchMakefile ] || \ - scotchMakefile=${scotchMakefile%/*}/Makefile.inc.OpenFOAM-Linux.shlib -if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \ - -a -r $FOAM_EXT_LIBBIN/libscotch.$SO \ - -a -r $FOAM_EXT_LIBBIN/libscotcherrexit.$SO ] +if [ -f "$SCOTCH_ARCH_PATH/include/scotch.h" ] \ +&& [ -r "$FOAM_EXT_LIBBIN/libscotch.$SO" ] \ +&& [ -r "$FOAM_EXT_LIBBIN/libscotcherrexit.$SO" ] then echo " scotch include: $SCOTCH_ARCH_PATH/include" echo " scotch library: $FOAM_EXT_LIBBIN" @@ -114,6 +119,11 @@ then echo "*** building scotch in serial ***" echo + [ -f "$scotchMakefile" ] || { + echo " Error: no such makefile: $scotchMakefile" + exit 1 + } + cd $SCOTCH_SOURCE_DIR/src || exit 1 export GIT_DIR=$SCOTCH_SOURCE_DIR/.git # Mask seeing our own git-repo rm -rf $SCOTCH_ARCH_PATH @@ -141,11 +151,11 @@ then exit 1 } - export CCS="${CC:-$WM_CC}" # CCS (serial compiler) default=$(CC) - export CCP=$(whichMpicc) # CCP (parallel compiler) default=mpicc + export CCS="$(whichCC)" # CCS (serial compiler) + export CCP="$(whichMpicc)" # CCP (parallel compiler) default=mpicc # Consistency for Intel-MPI and non-icc compilers - [ -n "$I_MPI_CC" ] || export I_MPI_CC="${CC:-$WM_CC}" + [ -n "$I_MPI_CC" ] || export I_MPI_CC="$(whichCC)" make realclean 2>/dev/null # Extra safety make -j $WM_NCOMPPROCS scotch \ @@ -191,6 +201,11 @@ then export WM_NCOMPPROCS=1 echo "*** building pt-scotch in serial ***" + [ -f "$scotchMakefile" ] || { + echo " Error: no such makefile: $scotchMakefile" + exit 1 + } + cd $SCOTCH_SOURCE_DIR/src || exit 1 export GIT_DIR=$SCOTCH_SOURCE_DIR/.git # Mask seeing our own git-repo echo @@ -213,11 +228,11 @@ then exit 1 } - export CCS="${CC:-$WM_CC}" # CCS (serial compiler) default=$(CC) + export CCS="$(whichCC)" # CCS (serial compiler) export CCP=$(whichMpicc) # CCP (parallel compiler) default=mpicc # Consistency for Intel-MPI and non-icc compilers - [ -n "$I_MPI_CC" ] || export I_MPI_CC="${CC:-$WM_CC}" + [ -n "$I_MPI_CC" ] || export I_MPI_CC="$(whichCC)" make realclean 2>/dev/null # Extra safety make -j $WM_NCOMPPROCS ptscotch \ diff --git a/BUILD.md b/BUILD.md index 5340378..31cd407 100644 --- a/BUILD.md +++ b/BUILD.md @@ -531,6 +531,9 @@ that clang compiler for building the newer llvm/clang version. [repo gperftools]: https://github.com/gperftools/gperftools [link gperftools]: https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz +[page zlib]: https://www.zlib.net/ +[link zlib]: https://sourceforge.net/projects/libpng/files/zlib/1.2.11/zlib-1.2.11.tar.xz + diff --git a/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Darwin.shlib b/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Darwin.shlib index 3262a61..f106e5a 100644 --- a/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Darwin.shlib +++ b/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Darwin.shlib @@ -1,12 +1,23 @@ #-------------------------------*- makefile -*--------------------------------- -# OpenFOAM notes: # -# WM_CFLAGS, WM_LDFLAGS contain "-m32 -fPIC" etc -# WM_LABEL_SIZE == 64 for 'long' instead of 'int' for OpenFOAM labels +# Prior to OpenFOAM-v1906, these were always part of the environment # +# - WM_CFLAGS : with -m32 / -m64 and -fPIC +# - WM_LDFLAGS : with -m32 / -m64 +# +# With OpenFOAM-v1906 and later +# +# - wmake -show-cflags : with -m32 / -m64 +# - wmake -show-cflags-arch : with -m32 / -m64 +# +# Pass these in via the enviroment since using '$(shell ...)' here does not +# always work well. +# +# Notes: # - compiled without pthread # # Normally set CCS, CCP by caller +#------------------------------------------------------------------------------ EXE = LIB = .dylib @@ -17,7 +28,7 @@ ARFLAGS = $(WM_CFLAGS) -dynamiclib -undefined dynamic_lookup -o CCS ?= $(CC) CCP ?= mpicc CCD = $(CCP) -CFLAGS = $(WM_CFLAGS) -O3 \ +CFLAGS = $(WM_CFLAGS) -fPIC -O3 \ -DCOMMON_FILE_COMPRESS_GZ \ -DCOMMON_RANDOM_FIXED_SEED \ -DSCOTCH_DETERMINISTIC \ diff --git a/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux-Mingw.shlib b/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux-Mingw.shlib new file mode 100644 index 0000000..05ece01 --- /dev/null +++ b/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux-Mingw.shlib @@ -0,0 +1,59 @@ +#-------------------------------*- makefile -*--------------------------------- +# +# Prior to OpenFOAM-v1906, these were always part of the environment +# +# - WM_CFLAGS : with -m32 / -m64 and -fPIC +# - WM_LDFLAGS : with -m32 / -m64 +# +# With OpenFOAM-v1906 and later +# +# - wmake -show-cflags : with -m32 / -m64 +# - wmake -show-cflags-arch : with -m32 / -m64 +# +# Pass these in via the enviroment since using '$(shell ...)' here does not +# always work well. +# +# Notes: +# - compiled without pthread +# +# Normally set CCS, CCP by caller +#------------------------------------------------------------------------------ + +EXE = +LIB = .dll +OBJ = .o + +AR = $(CC) +ARFLAGS = $(CFLAGS) -shared -Wl,--output-def,libscotch.def,--out-implib,libscotch.a,--enable-auto-import,--strip-all -o +CC = x86_64-w64-mingw32-gcc +CCS = x86_64-w64-mingw32-gcc +CCP = x86_64-w64-mingw32-gcc +CCD = gcc +CFLAGS = $(WM_CFLAGS) -fPIC -O3 \ + -DCOMMON_WINDOWS -DCOMMON_STUB_FORK -DCOMMON_PTHREAD_FILE \ + -UCOMMON_FILE_COMPRESS \ + -DCOMMON_RANDOM_FIXED_SEED \ + -DSCOTCH_DETERMINISTIC \ + -DSCOTCH_RENAME \ + -DSCOTCH_PTHREAD \ + -Drestrict=__restrict + +# 32-bit vs. 64-bit labels +ifeq ($(WM_LABEL_SIZE),64) +CFLAGS += -DINTSIZE64 +endif + +CLIBFLAGS = -shared +LDFLAGS = + +MAKE = make +CP = cp +CAT = cat +LN = ln +MKDIR = mkdir +MV = mv +RANLIB = echo +LEX = flex -Pscotchyy -olex.yy.c +YACC = bison -pscotchyy -y -b y + +#------------------------------------------------------------------------------ diff --git a/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux.shlib b/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux.shlib index 1733136..00a50a4 100644 --- a/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux.shlib +++ b/etc/makeFiles/scotch/Makefile.inc.OpenFOAM-Linux.shlib @@ -1,12 +1,23 @@ #-------------------------------*- makefile -*--------------------------------- -# OpenFOAM notes: # -# WM_CFLAGS, WM_LDFLAGS contain "-m32 -fPIC" etc -# WM_LABEL_SIZE == 64 for 'long' instead of 'int' for OpenFOAM labels +# Prior to OpenFOAM-v1906, these were always part of the environment # +# - WM_CFLAGS : with -m32 / -m64 and -fPIC +# - WM_LDFLAGS : with -m32 / -m64 +# +# With OpenFOAM-v1906 and later +# +# - wmake -show-cflags : with -m32 / -m64 +# - wmake -show-cflags-arch : with -m32 / -m64 +# +# Pass these in via the enviroment since using '$(shell ...)' here does not +# always work well. +# +# Notes: # - compiled without pthread # # Normally set CCS, CCP by caller +#------------------------------------------------------------------------------ EXE = LIB = .so @@ -17,7 +28,7 @@ ARFLAGS = $(WM_CFLAGS) -shared -o CCS ?= $(CC) CCP ?= mpicc CCD = $(CCP) -CFLAGS = $(WM_CFLAGS) -O3 \ +CFLAGS = $(WM_CFLAGS) -fPIC -O3 \ -DCOMMON_FILE_COMPRESS_GZ \ -DCOMMON_RANDOM_FIXED_SEED \ -DSCOTCH_DETERMINISTIC \ diff --git a/etc/testThirdPartyFunctions b/etc/testThirdPartyFunctions new file mode 100755 index 0000000..4e9cb5f --- /dev/null +++ b/etc/testThirdPartyFunctions @@ -0,0 +1,45 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM, licensed under GNU General Public License +# . +# +# Script +# testThirdPartyFunctions +# +# Description +# Simple ad hoc tests of etc/tools/ThirdPartyFunctions +# +#------------------------------------------------------------------------------ + +echo ======================================== +echo "Calling environment" +echo "CC=$CC" +echo "CXX=$CXX" +echo +echo ======================================== + +. "$WM_THIRD_PARTY_DIR/etc/tools/ThirdPartyFunctions" + +#------------------------------------------------------------------------------ + +echo "CC=$(whichCC)" +echo "CXX=$(whichCXX)" +echo "mpicc=$(whichMpicc)" +echo "mpicxx=$(whichMpicxx)" + +exportCompiler + +echo ======================================== +echo "using: $CC $CFLAGS" +echo "using: $CXX $CXXFLAGS" +echo +echo ======================================== + +#------------------------------------------------------------------------------ diff --git a/etc/tools/ThirdPartyFunctions b/etc/tools/ThirdPartyFunctions index be83b14..3186a7d 100644 --- a/etc/tools/ThirdPartyFunctions +++ b/etc/tools/ThirdPartyFunctions @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -19,6 +19,10 @@ # # Define the standard buildBASE and installBASE for the platform # Define WM_NCOMPPROCS always. +# +# Compiler and flags are managed via the 'wmake -show-c, -show-cflags, ..' +# but also with WM_CC, WM_CFLAGS,... env variables +# #------------------------------------------------------------------------------ # The normal locations for source, build and installation (prefix-dir) @@ -30,43 +34,86 @@ installBASE="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER" WM_SIZE_OPTIONS="${WM_PRECISION_OPTION}Int${WM_LABEL_SIZE}" # Dynamic library endings (default is .so) -[ "$(uname -s)" = Darwin ] && SO=dylib || SO=so +SO="$(wmake -show-ext-so 2>/dev/null)"; SO="${SO#.}" +if [ -z "$SO" ] && [ "$(uname -s)" = Darwin ] +then + SO=dylib +fi +: "${SO:=so}" + + +# Fallback values, needed for our scotch Makefile which uses +# WM_CFLAGS and WM_LDFLAGS for arch information +if [ -z "$WM_CFLAGS" ] +then + export WM_CFLAGS="$(wmake -show-cflags 2>/dev/null)" +fi + +if [ -z "$WM_LDFLAGS" ] +then + export WM_LDFLAGS="$(wmake -show-cflags-arch 2>/dev/null)" +fi unset BUILD_SUFFIX #------------------------------------------------------------------------------ -# Export WM compiler settings (and flags) for CMake/configure -# $1 = true: export compiler flags too +# Export compiler settings (and flags) for CMake/configure +# based on the values from wmake -show-compile-* +# +# Since "wmake -show-XX" is only available after 1904, continue to support +# the previous env variables method (WM_CC, WM_CFLAGS, WM_CXX, WM_CXXFLAGS) exportCompiler() { - if test -n "$WM_CC" && command -v "$WM_CC" >/dev/null + local comp flag + + # C compiler and flags + comp="$(wmake -show-c 2>/dev/null)" && \ + flag="$(wmake -show-cflags 2>/dev/null)" || { + comp="$WM_CC" + flag="$WM_CFLAGS" + } + + if test -n "$comp" && command -v "$comp" >/dev/null then - export CC="$WM_CC" - if [ "$1" = true -a -n "$WM_CFLAGS" ] + export CC="$comp" + if [ -n "$flag" ] then - export CFLAGS="$WM_CFLAGS" + export CFLAGS="$flag" fi fi - if test -n "$WM_CXX" && command -v "$WM_CXX" >/dev/null + # C++ compiler and flags + comp="$(wmake -show-cxx 2>/dev/null)" && \ + flag="$(wmake -show-cxxflags 2>/dev/null)" || { + comp="$WM_CXX" + flag="$WM_CXXFLAGS" + } + + if test -n "$comp" && command -v "$comp" >/dev/null then - export CXX="$WM_CXX" - if [ "$1" = true -a -n "$WM_CXXFLAGS" ] + export CXX="$comp" + if [ -n "$flag" ] then - export CXXFLAGS="$WM_CXXFLAGS" + export CXXFLAGS="$flag" fi fi } -# Export WM linker settings for CMake/configure +# Export linker settings for CMake/configure exportLinker() { - if [ -n "$WM_LDFLAGS" ] + local flag + + # Linker flags, actually just the machine arch + flag="$(wmake -show-cflags-arch 2>/dev/null)" || flag="$WM_LDFLAGS" + + if test -n "$flag" then - export LDFLAGS="$WM_LDFLAGS" + export LDFLAGS="$flag" fi } -# Force use of gcc/g++ + +# Force use of gcc/g++, but the values of CFLAGS, CXXFLAGS may be incorrect useGcc() { export CC=gcc @@ -86,39 +133,73 @@ useGccFlag() done } -# Return by default or if possible for INTELMPI. -# Cray doesn't have , but its manages mpi paths directly. -# NOTE: could further refine based on $CC or $WM_CC, but not yet needed -whichMpicc() +# Return current value of $CC if set or obtain from 'wmake -show-c', +# using $WM_CC (older env variable) as the first level fallback. +# Final fallback is +whichCC() { - local mpicc=$(command -v mpicc) - case "$WM_MPLIB" in - (INTELMPI) - mpicc=$(command -v mpiicc) # Intel available? - ;; - (CRAY-MPI*) - : ${mpicc:=cc} # Cray if there is no - ;; - esac - echo "${mpicc:-mpicc}" + local comp="$CC" + + if [ -z "$comp" ] + then + comp="$(wmake -show-c 2>/dev/null)" || comp="$WM_CC" + test -n "$comp" && command -v "$comp" >/dev/null || unset comp + fi + + echo "${comp:-gcc}" +} + + +# Return current value of $CXX if set or obtain from 'wmake -show-cxx', +# using $WM_CXX (older env variable) as the first level fallback. +# Final fallback is +whichCXX() +{ + local comp="$CXX" + + if [ -z "$comp" ] + then + comp="$(wmake -show-cxx 2>/dev/null)" || comp="$WM_CXX" + test -n "$comp" && command -v "$comp" >/dev/null || unset comp + fi + + echo "${comp:-g++}" } # Return by default or if possible for INTELMPI. # Cray doesn't have , but its manages mpi paths directly. -# NOTE: could further refine based on $CC or $WM_CC, but not yet needed -whichMpicxx() +# NOTE: could further refine based on "wmake -show-c", but not yet needed +whichMpicc() { - local mpicxx=$(command -v mpicxx) + local comp="$(command -v mpicc)" case "$WM_MPLIB" in (INTELMPI) - mpicxx=$(command -v mpiicpc) # Intel available? + comp="$(command -v mpiicc)" # Intel available? ;; (CRAY-MPI*) - : ${mpicxx:=CC} # Cray if there is no + : "${comp:=cc}" # Cray if there is no ;; esac - echo "${mpicxx:-mpicxx}" + echo "${comp:-mpicc}" +} + + +# Return by default or if possible for INTELMPI. +# Cray doesn't have , but its manages mpi paths directly. +# NOTE: could further refine based on "wmake -show-cxx", but not yet needed +whichMpicxx() +{ + local comp="$(command -v mpicxx)" + case "$WM_MPLIB" in + (INTELMPI) + comp="$(command -v mpiicpc)" # Intel available? + ;; + (CRAY-MPI*) + : "${comp:=CC}" # Cray if there is no + ;; + esac + echo "${comp:-mpicxx}" } # Require wmkdepend etc when building with wmake diff --git a/makeADIOS b/makeADIOS index 7e27744..238d2a9 100755 --- a/makeADIOS +++ b/makeADIOS @@ -41,8 +41,8 @@ usage() { usage: ${0##*/} [OPTION] [adios-VERSION] [-- configure-options] options: - -cmake PATH With cmake from the path given - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ + -cmake PATH With cmake from the given path -help * Build ADIOS diff --git a/makeADIOS2 b/makeADIOS2 index 1ea298e..1cd1cf7 100755 --- a/makeADIOS2 +++ b/makeADIOS2 @@ -39,8 +39,8 @@ usage() { usage: ${0##*/} [OPTION] [adios-VERSION] options: - -cmake PATH With cmake from the path given - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ + -cmake PATH With cmake from the given path -help * Build ADIOS2 diff --git a/makeCCMIO b/makeCCMIO index 75c4e6f..732fe4b 100755 --- a/makeCCMIO +++ b/makeCCMIO @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -53,7 +53,7 @@ usage() Usage: ${0##*/} [OPTION] [lib|libso] [libccmio-VERSION] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * Compile the proprietary libccmio library diff --git a/makeCGAL b/makeCGAL index d06882e..fd14f81 100755 --- a/makeCGAL +++ b/makeCGAL @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2012-2016 OpenFOAM Foundation @@ -85,10 +85,11 @@ usage() { usage: ${0##*/} [OPTION] [CGAL-VERSION] [boost-VERSION] [gmp-VERSION] [mpfr-VERSION] options: - -cmake PATH with cmake from the path given - -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX - -no-lib compile CGAL for use in headers only mode (since CGAL 4.9) - -system use system versions for boost/gmp/mpfr + -gcc Force use of gcc/g++ + -cmake PATH Use cmake from the given path + -no-lib Compile CGAL for use in headers only mode (since CGAL 4.9) + -toolset=NAME Use named toolset in bootstrap + -system Use system versions for boost/gmp/mpfr -help * build CGAL with @@ -110,7 +111,7 @@ USAGE #------------------------------------------------------------------------------ exportCompiler # Compiler info for CMake/configure -unset optHeadersOnly +unset optHeadersOnly optToolset # Parse options while [ "$#" -gt 0 ] do @@ -124,6 +125,9 @@ do CMAKE_PATH="${2%%/}" shift ;; + -toolset=*) + optToolset="${1*=}" + ;; -sys*) gmpPACKAGE="gmp-system" mpfrPACKAGE="mpfr-system" @@ -234,12 +238,16 @@ else rm -rf $BOOST_ARCH_PATH + # Toolset to use + [ -n "$optToolset" ] || optToolset="$(whichCC)" + ./bootstrap.sh \ --prefix=$BOOST_ARCH_PATH \ --libdir=$boostLib \ --with-libraries=thread \ --with-libraries=system \ - && ./bjam toolset=$WM_CC -j $WM_NCOMPPROCS install \ + --with-toolset="$optToolset" \ + && ./b2 toolset="$optToolset" -j $WM_NCOMPPROCS install \ && echo "Built: boost" ) || { echo "Error building: boost" diff --git a/makeCmake b/makeCmake index 6dc9bf2..7b2197b 100755 --- a/makeCmake +++ b/makeCmake @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2011 OpenFOAM Foundation @@ -44,7 +44,7 @@ usage() { usage: ${0##*/} [OPTION] cmake-VERSION options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -link Create additional symlink as 'cmake-system' -help diff --git a/makeFFTW b/makeFFTW index 7ee0f16..607d756 100755 --- a/makeFFTW +++ b/makeFFTW @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -59,7 +59,7 @@ usage() { usage: ${0##*/} [OPTION] [fftw-VERSION] [-- configure-options] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * build FFTW with diff --git a/makeGperftools b/makeGperftools index 1a65417..000aa9d 100755 --- a/makeGperftools +++ b/makeGperftools @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2012 OpenFOAM Foundation @@ -43,7 +43,7 @@ usage() { usage: ${0##*/} [gperftools-VERSION] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * build gperftools diff --git a/makeHYPRE b/makeHYPRE index c125cb2..fb4a93e 100755 --- a/makeHYPRE +++ b/makeHYPRE @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -74,7 +74,7 @@ usage() { usage: ${0##*/} [OPTION] [lib|libso] [HYPRE-VERSION] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * build HYPRE with diff --git a/makeKAHIP b/makeKAHIP index 523eb7f..5093f34 100755 --- a/makeKAHIP +++ b/makeKAHIP @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -75,7 +75,7 @@ usage() Usage: ${0##*/} [OPTION] [lib|libso] [kahip-VERSION] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * Compile KaHIP diff --git a/makeLLVM b/makeLLVM index 1357193..8cd98b9 100755 --- a/makeLLVM +++ b/makeLLVM @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -64,8 +64,8 @@ usage() { usage: ${0##*/} [OPTION] [llvm-VERSION] options: - -cmake PATH with cmake from the path given - -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ + -cmake PATH with cmake from the given path -help * build llvm/clang diff --git a/makeMETIS b/makeMETIS index 103a8f6..a7e2263 100755 --- a/makeMETIS +++ b/makeMETIS @@ -74,7 +74,7 @@ usage() { usage: ${0##*/} [OPTION] [lib|libso] [METIS-VERSION] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * build METIS with diff --git a/makeMGridGen b/makeMGridGen index bb048cc..1638e95 100755 --- a/makeMGridGen +++ b/makeMGridGen @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -42,7 +42,7 @@ usage() { usage: ${0##*/} [OPTION] [mgridgen-VERSION] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * Build MGridGen @@ -59,12 +59,10 @@ exportCompiler # Compiler info for CMake/configure while [ "$#" -gt 0 ] do case "$1" in - -h | -help) - usage - ;; - -gcc) - useGcc # Use gcc/g++ - ;; + '') ;; # Ignore empty + -h | -help) usage ;; + -gcc) useGcc ;; + mgridgen-[1-9]* | MGridGen-[1-9]* | parmgridgen-[1-9]* | ParMGridGen-[1-9]*) mgridgenPACKAGE="${1%%/}" ;; @@ -147,8 +145,8 @@ else # Remove any existing build folder and recreate rm -rf $MGRIDGEN_ARCH_PATH - serial="${CC:-$WM_CC}" # CC (serial compiler) default=cc - # parallel=$(whichMpicc) # PARCC (parallel compiler) default=mpicc + serial="$(whichCC)" # CC (serial compiler) default=gcc + # parallel=$(whichMpicc) # PARCC (parallel compiler) default=mpicc # PARCC=$parallel # PARLD=$parallel # PARLIBS="-L../.. -lparmgrid -lmgrid -lm" @@ -156,8 +154,8 @@ else make \ COPTIONS="-fPIC" \ LDOPTIONS="-fPIC" \ - CC=$serial \ - LD=$serial \ + CC="$serial" \ + LD="$serial" \ LIBDIR="-L../.." \ LIBS="-L../.. -lmgrid -lm" \ make=make \ diff --git a/makeMPICH b/makeMPICH index 207b61c..c5fcb6e 100755 --- a/makeMPICH +++ b/makeMPICH @@ -70,7 +70,7 @@ usage() { usage: ${0##*/} [OPTION] [mpich-VERSION] [-- configure-options] options: - -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * build mpich with diff --git a/makeMVAPICH b/makeMVAPICH index 1da072c..c45e4d4 100755 --- a/makeMVAPICH +++ b/makeMVAPICH @@ -70,7 +70,7 @@ usage() { usage: ${0##*/} [OPTION] [mvapich2-VERSION] [-- configure-options] options: - -gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * build mvapich2 with diff --git a/makeMesa b/makeMesa index 114db82..88b4573 100755 --- a/makeMesa +++ b/makeMesa @@ -49,7 +49,7 @@ usage() { usage: ${0##*/} [OPTION] mesa-VERSION [-- configure-options] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -llvm VER llvm version (in ThirdParty) or 'system' to use system -help diff --git a/makeOPENMPI b/makeOPENMPI index 84b9773..fa26b30 100755 --- a/makeOPENMPI +++ b/makeOPENMPI @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -70,7 +70,7 @@ usage() { usage: ${0##*/} [OPTION] [openmpi-VERSION] [-- configure-options] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -memcheck Configure with --enable-memcheck (requires valgrind.h) -threaded Configure with --enable-mpi-thread-multiple -no-threaded Configure with --disable-mpi-thread-multiple diff --git a/makePETSC b/makePETSC index e362cd8..dc7c5af 100755 --- a/makePETSC +++ b/makePETSC @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -74,7 +74,7 @@ usage() { usage: ${0##*/} [OPTION] [lib|libso] [PETSC-VERSION] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * build PETSC with diff --git a/makeParaView b/makeParaView index afba89f..8480af9 100755 --- a/makeParaView +++ b/makeParaView @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -72,7 +72,8 @@ usage() { usage: ${0##*/} [OPTION] [paraview-VERSION] [CMAKE-OPTION] options: - -gcc force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ + -cmake PATH with cmake from the given path -rebuild for repeated builds (-make -install) *use with caution* -gl2 with new rendering backend (default: auto) -mesa with mesa @@ -85,10 +86,9 @@ options: -python-include DIR location of python headers (current: ${PYTHON_INCLUDE:-none}) -python-lib PATH path to python library (current: ${PYTHON_LIBRARY:-none}) - -cmake PATH with cmake from the path given - -qmake PATH with the Qt version corresponding to the qmake path given + -qmake PATH with QT version corresponding to the qmake in given path -qt with extra Qt gui support (if not already enabled) - -qt-VER with Qt version corresponding to + -qt-VER with QT version corresponding to \$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/qt-VER/bin/qmake -verbose verbose output in Makefiles -version VER specify an alternative version (current: $ParaView_VERSION) diff --git a/makeQt b/makeQt index f3dbb01..ee219f5 100755 --- a/makeQt +++ b/makeQt @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # | Copyright (C) 2011 OpenFOAM Foundation @@ -37,7 +37,7 @@ usage() { usage: ${0##*/} [OPTION] [qt-VERSION] [-- configure-options] options: - -gcc Force gcc/g++ instead of using \$WM_CC, \$WM_CXX + -gcc Force use of gcc/g++ -help * build $qtTYPE, version ${qtVERSION:-undefined} diff --git a/makeVTK b/makeVTK index e3e5907..85a243a 100755 --- a/makeVTK +++ b/makeVTK @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -63,7 +63,8 @@ usage() { usage: ${0##*/} [OPTION] [vtk-VERSION] [CMAKE-OPTION] options: - -gcc force g++ instead of the value from \$WM_CXX + -gcc Force use of gcc/g++ + -cmake PATH with cmake from the given path -rebuild for repeated builds (-make -install) *use with caution* -gl2 with new rendering backend (default: auto) -mesa with mesa (if not already enabled) @@ -73,7 +74,6 @@ options: -osmesa with off-screen mesa only -mpi with mpi (VTK_Group_MPI=ON) -mpi=N with max 'N' mpi processes. N=0 for no upper-limit. - -cmake PATH with cmake from the path given -verbose verbose output in Makefiles -version VER specify an alternative version (current: $VTK_VERSION) -buildType NAME specify the build type (default: Release)