2 cd ${0%/*} ||
exit 1 # run from this directory
4 if [ "$PWD" != "$WM_PROJECT_DIR" ]
7 echo "Error: Current directory is not \$WM_PROJECT_DIR"
8 echo " The environment variables are not consistent with the installation."
9 echo " Please source configuration files."
12 echo " bash: . etc/bashrc"
13 echo " tcsh: source etc/cshrc"
15 echo " If you sourced the configuration files, please check the 'foamInstall' entry."
20 if [ -z "$PARAVIEW_SYSTEM" ] && [ -z "$QT_BIN_DIR" ]
23 echo "\$QT_BIN_DIR not set. To compile Paraview from sources"
24 echo "the command \$QT_BIN_DIR/qmake needs to be valid."
27 echo " Ubuntu: \"export QT_BIN_DIR=/usr/bin\""
28 echo " Fedora: \"export QT_BIN_DIR=????\""
29 echo " openSuse: \"export QT_BIN_DIR=????\""
31 read -r -p "Proceed without compiling ParaView [Y/n] " response
32 if [[ $response =~ ^
([nN
][oO
]|
[nN
])$
]]
38 # Check whether we will be compiling cudaSolvers
39 if [ -f $CUDA_BIN_DIR/nvcc
]
42 echo "Cuda compiler detected at $CUDA_BIN_DIR/nvcc;"
43 echo "cudaSolvers will be compiled by default."
46 # If yes, check presence of $CUDA_ARCH
47 if [ -z "$CUDA_ARCH" ]
50 echo "\$CUDA_ARCH is required by nvcc compiler but not set."
51 echo "Check section '-gpu-architecture' in 'man nvcc' for details."
53 read -r -p "Proceed without compiling cudaSolvers? [Y/n] " response
54 if [[ $response =~ ^
([nN
][oO
]|
[nN
])$
]]
60 echo "Cuda architecture set to: $CUDA_ARCH"
63 # wmake is required for subsequent targets
64 ( cd wmake
/src
&& make )
66 # build ThirdParty sources
67 ( cd $WM_THIRD_PARTY_DIR && .
/AllMake.pre
)
69 # We make sure the ThirdParty packages environment variables are up-to-date
70 # before compiling the rest of OpenFOAM
71 .
$WM_PROJECT_DIR/etc
/settings.sh
73 # build OpenFOAM libraries and applications
82 # build ThirdParty sources that depend on main installation
83 ( cd $WM_THIRD_PARTY_DIR && .
/AllMake.post
)
85 # ----------------------------------------------------------------- end-of-file