Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Allwclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. "${WM_PROJECT_DIR:?}"/wmake/scripts/wmakeFunctions # The wmake functions
# -----------------------------------------------------------------------------

# Remove library files
# - regular and mpi-specific locations

echo "Removing pybFoam* from standard locations"

for libDir in "$FOAM_LIBBIN" "$FOAM_SITE_LIBBIN" "$FOAM_USER_LIBBIN"
do
if [ -d "$libDir" ]
then
for dir in "$libDir" "$libDir/$FOAM_MPI"
do
rm -f "$dir"/pybFoam*
done
fi
done

# Cleanup generated files - remove entire top-level
removeObjectDir "$PWD"

#------------------------------------------------------------------------------
66 changes: 66 additions & 0 deletions Allwmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
export WM_CONTINUE_ON_ERROR=true # Optional unit
. "${WM_PROJECT_DIR:?}"/wmake/scripts/cmakeFunctions # Cmake functions
. "${WM_PROJECT_DIR:?}"/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------
# Copyright (C) 2026 Keysight Technologies
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Note
# Build into FOAM_USER_{APPBIN,LIBBIN} unless otherwise specified with
# -prefix or FOAM_MODULE_{APPBIN,LIBBIN}, CMAKE_INSTALL_PREFIX env varables
#
#------------------------------------------------------------------------------

# Default to user location
# - Long form to avoid dash 0.5.8 error (issue #1757)
[ -n "$FOAM_MODULE_PREFIX" ] || FOAM_MODULE_PREFIX="${FOAM_USER_LIBBIN%/*}"
[ -n "$CMAKE_INSTALL_PREFIX" ] || CMAKE_INSTALL_PREFIX="$FOAM_MODULE_PREFIX"
export FOAM_MODULE_PREFIX CMAKE_INSTALL_PREFIX

cmakeOpts="-DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX"

#------------------------------------------------------------------------------

echo "======================================================================"
echo "${PWD##*/} : $PWD"
echo

depend=none

if [ -f "$PWD"/.venv/bin/activate ]
then
. "$PWD"/.venv/bin/activate ''
echo "virtual environment : .venv/bin/activate"
if command -v pip >/dev/null
then
echo "updating required infrastructure"
echo
pip install -e '.[dep]'
fi
else
echo "no virtual environment"
fi

if [ "$targetType" = objects ]
then
depend=ignore
elif [ -n "$depend" ]
then
if command -v cmake >/dev/null
then
echo "pybFoam prefix : $CMAKE_INSTALL_PREFIX"
cmakeVersionedInstall "$depend" "$PWD" $cmakeOpts || {
echo
echo " WARNING: incomplete build of pybFoam"
echo
}
else
echo "==> skip pybFoam (needs cmake)"
fi
fi

echo "======================================================================"

#------------------------------------------------------------------------------
Loading