diff --git a/build.sh b/build.sh index ffbe7e85d747dff00a7f4ad63def47a257312cea..9adccb78ca07b1dcd601d6d55e7ded29b63883a2 100755 --- a/build.sh +++ b/build.sh @@ -29,14 +29,13 @@ then echo 1 > $HOME/$5/MPI/version fi - module load gcc/4.9.2 ### Activate MPI ### export PATH="$PATH:$HOME/$5/MPI/bin" mkdir $HOME/$5 if [ x"$4" == x"full" ]; then - ./install -i $HOME/$5 -s -c "--prefix=/home/jenkins/openfpm_install" + ./install CC=gcc-4.9.2 CXX=g++-4.9.2 FC=gfortran-4.9.2 F77=gfortran-4.9.2 -i $HOME/$5 -s -c "--prefix=/home/jenkins/openfpm_install" mv $HOME/openfpm_vars $HOME/openfpm_vars_$5 source $HOME/openfpm_vars_$5 elif [ x"$3" == x"numerics" ]; then diff --git a/script/detect_gcc b/script/detect_gcc index afd3cc7aedfdc4e3c32fa9368b877fb93bb3303f..04bd00d5ab4a09638f5172c85a6466e046d14294 100755 --- a/script/detect_gcc +++ b/script/detect_gcc @@ -23,6 +23,29 @@ function detect_compiler() dgc_ret=0 + if [ x"$CXX" != x"" -o x"$CC" != x"" -o x"$F77" != x"" -o x"$FC" != x"" ]; then + + if [ $CXX ] + + echo -e "\033[1;34;5m ---------------------------------------------------------------------- \033[0m" + echo -e "\033[1;34;5m Selected compilers \033[0m" + echo -e "\033[1;34;5m ---------------------------------------------------------------------- \033[0m" + + echo -e "\033[91;1m The user request to use specifics compilers to compile C/C++ or Fortran code \033[0m" + echo -e "\033[91;1m specifing one or more of these variables CXX/CC/F77/FC. When at least one is \033[0m" + echo -e "\033[91;1m defined the specified compiler will be used. \033[0m" + echo -e "\033[91;1m When not specified the system will use the default g++/gcc/gfortran/gfortran \033[0m" + echo -e "\033[91;1m The installer will use the following compilers \033[0m" + + echo -e "" + echo -e "CXX=$CXX" + echo -e "CC=$CC" + echo -e "F77=$F77" + echo -e "FC=$FC" + + return + fi + # First we try to understand if g++ command line is linked to clang g++ --version | grep "Apple LLVM" diff --git a/script/remove_old b/script/remove_old index 9cbecfe21cbee037fba7c5f02710a0c4dc520216..c1ba26f29f843e4711918eb9ba6675a26ed73f18 100755 --- a/script/remove_old +++ b/script/remove_old @@ -156,6 +156,7 @@ function remove_old() echo -e "\033[1;34;5m OPENBLAS has been updated, the component will be updated automatically \033[0m" echo -e "\033[1;34;5m ---------------------------------------------------------------------- \033[0m" sleep 5 + rm -rf $1/OPENBLAS rm -rf $1/EIGEN rm -rf $1/PETSC rm -rf $1/SUITESPARSE