- give precedence to ~openmp (-no-openmp) over +openmp (-openmp)
in the general rules and in the Makefile. This makes it robuster
when specifying +openmp in general, but ~openmp for specific build
components.
- disable openmp for OSspecific and Pstream components.
Neither should contain any openmp code anyhow.
Additionally, since OSspecific is generally built as a static
object, it can become problematic (eg, with AMD ROCm) if the
compiler generates information that openmp is required but then uses
static linkage.
- specify any of these
./Allwmake -build-root=...
wmake -build-root=...
FOAM_BUILDROOT=... wmake
these specify an alternative root where build artifacts are to land.
Currently only used as an alternative for the 'build/' hierarchy
since the 'platforms/' target normally includes inputs as well.
Possible use:
```
(
export WM_MPLIB="%{foam_mplib}"
export FOAM_MPI="%{foam_mpi}"
export MPI_ARCH_PATH="%{mpi_prefix}"
export FOAM_BUILDROOT=/tmp/mpibuild
export FOAM_MPI_LIBBIN="$FOAM_BUILDROOT/platforms/$WM_OPTIONS/lib/$FOAM_MPI"
src/Pstream/Allwmake-mpi
)
```
- add to wmakeFunctions to ensure it works even without 'make' being
installed. Exit immediately after -show-api for consistency with
-version.
foamEtcFile:
- drop warnings for some old (pre-v1812) defunct options
and simply flag as unknown options.
- handle -version, --version as equivalent to -show-api
ENH: provide fallback prefix for cmake detection
STYLE: simplify some shell syntax, avoid uname call in sysFunctions
STYLE: report FOAM_MPI during mpiLib builds
- experienced while reusing src/Pstream/Allwmake-mpi to create
additional mpi-layers after installation. Since the copied sources
are not located within the OpenFOAM source-tree (and/or the
source-tree is non-writable), it should not and does not use the
central build/WM_OPTIONS directory.
However, when exploring for the appropriate local Make directory, it
searched for the current '.' directory instead of checking for the
resolved directory.
This fails, since there is no src/Pstream/Make directory.
Must check for src/Pstream/mpi/Make directory first!
- Adjust wclean to always remove a local build directory
(Make/WM_OPTIONS) for additional safety.
After which, attempt to remove central build/WM_OPTIONS version too.
- dependency handling relocated from cmakeFunctions to wmakeFunctions
and reused for mpi-versioned builds. This allows more checks for
configuration parameters and removes hard-code build path
information.
CONFIG: remove spurious mplibHPMPI entries
CONFIG: remove ADIOS1 rules (antiquated)
- preferentially handle Allwmake.override, which allows packaging
tools to define alternative make scripts, or selectively disable
components.
- remove legacy handling of 'Optional' directory.
Conditionals have since migrated into scripts themselves and/or
use the wmake/scripts/have_* framework.
BUG: missed passing -debug for Allwmake scripts
- provide default WM_DIR if not already set, to improve robustness if a
reduced environment is used
- add etc/ to WM_PROJECT_SITE search. This makes the site directory
structure consistent with the OpenFOAM structure.
Eg,
WM_PROJECT_SITE/etc/..
WM_PROJECT_SITE/bin/..
WM_PROJECT_SITE/platforms/..
- Don't set/export WM_OSTYPE. The default is POSIX and is properly
defaulted throughout, including in CMakeLists-OpenFOAM.txt (also for
Catalyst)
- However, the new ragel-based parser is much faster
than the others, and does not cause 'too many open files' error
that the flex-based parser does (issue #784).
The timings (using src/sampling as being somewhat representative)
$ wclean; wmakeLnInclude -u .; time wmake -s dep
3.4s wmkdepend (ragel) [now default]
5.7s wmkdep (flex)
6.1s cpp -M
- The makeDepend script is for testing purposes only, but could used as
a hook for other dependency generation systems (eg, ninja).
It simply wraps 'cpp -M' in a form that is calling compatible with
wmkdepend.
BUG: wmkdepend parser was missing optional leading space on #include match
STYLE: use -G2 (goto-based) option for wmkdepend state machine
- the machine is compact with few states and lends itself to this
- handle sourcing bashrc with a relative path (issue #383)
- handle sourcing from bash and zsh.
Still need manual intervention when sourcing dash, sh, or ksh.
- replace grep in etc/cshrc with sed only
- logical instead of physical path for WM_PROJECT_DIR (issue #431).
Doesn't seem to be possible for csh/tcsh.
* Continue using physical locations when comparing directories,
but not for the top-level FOAM_INST_DIR, WM_PROJECT_DIR.
- relocate WM_CC, WM_CXX overrides from etc/config.*/compiler
to etc/config.*/settings to ensure that they are left untouched
when etc/config.sh/compiler is sourced while making third-party
packages (eg, gcc, llvm, CGAL).
- provide fallback FOAM_TUTORIALS setting in RunFunctions
STYLE: remove "~OpenFOAM" fallback as being too rare, non-obvious