ENH: remove reliance on OpenFOAM etc/config.sh/functions file.

- similar functionality in etc/tools/ThirdPartyFunctions to improve
  the independence of ThirdParty while reducing clutter in the callers.

- add useGcc function for convenience
- mask seeing our own git-repo when building

STYLE: various items

- eliminate old user-editable configuration in files - now command-line only.
- use *_BUILD_DIR instead of *_BINARY_DIR for more clarity of the purpose
- drop use of '-q' option for wmakeCheckPwd (already has stderr redirect)
- drop checkVersion for makeParaView since it stopped working properly
  with newer paraview version

CONFIG: update list of versions
This commit is contained in:
mark
2017-03-14 15:37:21 +01:00
parent 5d592841fd
commit 59be96faed
26 changed files with 437 additions and 472 deletions

View File

@ -35,15 +35,17 @@
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd -q "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
# Special purpose script - no default version.
unset cmakePACKAGE
#------------------------------------------------------------------------------
usage() {
exec 1>&2
@ -63,7 +65,7 @@ USAGE
exit 1
}
#------------------------------------------------------------------------------
# Ensure CMake gets the correct C/CC++ compiler
# Compiler settings for CMake/configure
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
@ -72,13 +74,10 @@ unset optLink
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help)
usage
;;
-gcc)
export CC=gcc # use gcc/g++
export CXX=g++
;;
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
-link)
optLink=true
;;
@ -117,6 +116,7 @@ else
buildDIR=$buildBASE/$cmakePACKAGE
cd $CMAKE_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
make distclean 2>/dev/null
rm -rf $buildDIR