Commit 9009a8c2 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: improve installation handling

- handle -prefix=DIR for specifying installation locations outside of
  the regular OpenFOAM tree.
parent 8cdeac38
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
cd "${0%/*}" || exit # Run from this directory
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmake.cmake-args
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
# -----------------------------------------------------------------------------
if [ -n "$CMAKE_INSTALL_PREFIX" ]
then
export CMAKE_INSTALL_PREFIX
fi
#------------------------------------------------------------------------------
echo "========================================"
......
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
. $WM_PROJECT_DIR/wmake/scripts/have_adios2
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmake.cmake-args
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_adios2
# -----------------------------------------------------------------------------
if [ -n "$CMAKE_INSTALL_PREFIX" ]
then
export CMAKE_INSTALL_PREFIX
fi
#------------------------------------------------------------------------------
if have_adios2
then
adiosFoam/Allwmake
......
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
. $WM_PROJECT_DIR/wmake/scripts/have_adios2
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmake.cmake-args
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_adios2
# -----------------------------------------------------------------------------
if [ -n "$CMAKE_INSTALL_PREFIX" ]
then
export CMAKE_INSTALL_PREFIX
fi
if have_adios2
then
wmake libso
......
......@@ -16,4 +16,4 @@ write/adiosCoreWriteCloud.C
time/adiosTime.C
LIB = $(FOAM_LIBBIN)/libadiosFoam
LIB = $(CMAKE_INSTALL_PREFIX)/lib/libadiosFoam
sinclude $(GENERAL_RULES)/ADIOS2
/* Default is PROJECT target */
ifeq (,$(CMAKE_INSTALL_PREFIX))
CMAKE_INSTALL_PREFIX := $(dir $(FOAM_LIBBIN))
endif
EXE_INC = \
$(PFLAGS) $(PINC) $(ADIOS_FLAGS) \
-I$(LIB_SRC)/meshTools/lnInclude \
......
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
. $WM_PROJECT_DIR/wmake/scripts/have_adios2
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmake.cmake-args
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_adios2
# -----------------------------------------------------------------------------
if [ -n "$CMAKE_INSTALL_PREFIX" ]
then
export CMAKE_INSTALL_PREFIX
fi
#------------------------------------------------------------------------------
if have_adios2
then
# extra compile/link options
# Extra compile/link options
adiosFoam=$(cd ../adiosFoam && pwd -P)
export ADIOS_EXTRA_COMP="-I$adiosFoam/lnInclude"
export ADIOS_EXTRA_LINK='-L$(FOAM_USER_LIBBIN) -ladiosFoam'
if [ -n "$CMAKE_INSTALL_PREFIX" ]
then
export ADIOS_EXTRA_LINK='-L$(CMAKE_INSTALL_PREFIX)/lib -ladiosFoam'
fi
wmake libso
else
echo "==> skip adiosFoam library"
......
......@@ -2,4 +2,4 @@ adiosReadData.C
adiosWrite.C
adiosWriteData.C
LIB = $(FOAM_LIBBIN)/libadiosFunctionObjects
LIB = $(CMAKE_INSTALL_PREFIX)/lib/libadiosFunctionObjects
sinclude $(GENERAL_RULES)/ADIOS2
/* Default is PROJECT target */
ifeq (,$(CMAKE_INSTALL_PREFIX))
CMAKE_INSTALL_PREFIX := $(dir $(FOAM_LIBBIN))
endif
EXE_INC = \
$(PFLAGS) $(PINC) $(ADIOS_FLAGS) \
${ADIOS_EXTRA_COMP} \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment