diff --git a/.hgignore b/.hgignore index ff3ef0f1f..b7d2d7028 100644 --- a/.hgignore +++ b/.hgignore @@ -88,3 +88,13 @@ testHarness/OpenFOAM/1.6-ext/runDir/CTestTestfile.cmake testHarness/OpenFOAM/1.6-ext/runDir/DartConfiguration.tcl testHarness/OpenFOAM/1.6-ext/runDir/Makefile testHarness/OpenFOAM/1.6-ext/runDir/cmake_install.cmake + +# The following files are blacklisted because of a DMCA complaint by ANSYS. +src/lduSolvers/tools/PriorityArray.C +src/lduSolvers/tools/PriorityArray.H +src/lduSolvers/amg/amgPolicy/samgPolicy.C +src/lduSolvers/amg/amgPolicy/samgPolicy.H +src/lduSolvers/amg/amgPolicy/aamgPolicy.C +src/lduSolvers/amg/amgPolicy/aamgPolicy.H + +# end-of-file diff --git a/etc/bashrc b/etc/bashrc index a769d1ca4..067ce1023 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -265,26 +265,74 @@ Darwin) # We need to get rid of the revision number from this string. eg turn "10.7.5" into "10.7" export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion | sed -e "s/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1.\2/g"` - if [ "$compilerInstall" == "System" ] + # this gives strange results with some shells + # v=(`sw_vers -productVersion | sed 's/\./ /g'`) + # export MACOSX_DEPLOYMENT_TARGET="${v[0]}.${v[1]}" + + export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion | sed -e "s/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)/\1.\2/g"` + + which -s port >/dev/null + if [ $? -eq "0" -a -d '/opt/local/etc/macports' ] then - # Use Mac-Ports-Compiler instead of Apple-gcc-4.2 - case $WM_COMPILER in - Gcc43) - export WM_CC='gcc-mp-4.3' - export WM_CXX='g++-mp-4.3' - ;; - Gcc44) - export WM_CC='gcc-mp-4.4' - export WM_CXX='g++-mp-4.4' - ;; - Gcc45) - export WM_CC='gcc-mp-4.5' - export WM_CXX='g++-mp-4.5' - ;; - *) - export WM_COMPILER= - ;; - esac + if [ "$FOAM_VERBOSE" -a "$PS1" ] + then + echo "Using Macports binaries" + fi + + export WM_USE_MACPORT=1 + + if [ "$compilerInstall" == "System" ] + then + # Use Mac-Ports-Compiler instead of Apple-gcc-4.2 + case $WM_COMPILER in + Gcc42) + export WM_MACPORT_VERSION=4.2 + ;; + Gcc43) + export WM_MACPORT_VERSION=4.3 + ;; + Gcc44) + export WM_MACPORT_VERSION=4.4 + ;; + Gcc45) + export WM_MACPORT_VERSION=4.5 + ;; + Gcc46) + export WM_MACPORT_VERSION=4.6 + ;; + Gcc47) + export WM_MACPORT_VERSION=4.7 + ;; + Gcc48) + export WM_MACPORT_VERSION=4.8 + ;; + Gcc) + ;; + *) + echo "Unsupported MacPorts-Compiler $WM_COMPILER" + ;; + esac + if [ "$WM_COMPILER" != "Gcc" ] + then + export WM_CC="gcc-mp-$WM_MACPORT_VERSION" + export WM_CXX="g++-mp-$WM_MACPORT_VERSION" + + ruleDirBase=$WM_DIR/rules/$WM_ARCH + ruleDir=$ruleDirBase$WM_COMPILER + if [ ! -e $ruleDir ] + then + echo "Rule directory $ruleDir not existing. Linking to $ruleDirBase" + ln -s $ruleDirBase $ruleDir + fi + unset ruleDir ruleDirBase + fi + fi + fi + if [ -z "$WM_CC" ] + then + # nobody set the compiler + export WM_CC="gcc" + export WM_CXX="g++" fi ;; diff --git a/etc/settings.sh b/etc/settings.sh index e6a1bb0a3..01fe4ed2a 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -187,17 +187,19 @@ fi unset compilerBin compilerLib compilerInstall -case "$WM_COMPILER" in -Gcc*) - export WM_CC='gcc' - export WM_CXX='g++' - ;; -Icc) - export WM_CC='icc' - export WM_CXX='icpc' - ;; -esac - +if [ -z "$WM_CC" ] +then + case "$WM_COMPILER" in + Gcc*) + export WM_CC='gcc' + export WM_CXX='g++' + ;; + Icc) + export WM_CC='icc' + export WM_CXX='icpc' + ;; + esac +fi # Communications library # ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/wmake/rules/darwinIntel64/c b/wmake/rules/darwinIntel64/c index a686d4eeb..7d81ffc19 100644 --- a/wmake/rules/darwinIntel64/c +++ b/wmake/rules/darwinIntel64/c @@ -2,7 +2,7 @@ cWARN = -Wall -cc = gcc $(WM_CXXFLAGS) +cc = $(WM_CC) $(WM_CXXFLAGS) include $(RULES)/c$(WM_COMPILE_OPTION) diff --git a/wmake/rules/darwinIntel64/c++ b/wmake/rules/darwinIntel64/c++ index 27fcb0c34..27b66c29e 100644 --- a/wmake/rules/darwinIntel64/c++ +++ b/wmake/rules/darwinIntel64/c++ @@ -2,7 +2,7 @@ c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -CC = g++ $(WM_CXXFLAGS) +CC = $(WM_CXX) $(WM_CXXFLAGS) include $(RULES)/c++$(WM_COMPILE_OPTION)