]> https://gitweb.dealii.org/ - candi.git/commitdiff
Cleanup compiler variables 242/head
authorFabian Castelli <fabian.castelli@kit.edu>
Thu, 8 Jul 2021 12:32:19 +0000 (14:32 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Thu, 8 Jul 2021 12:36:10 +0000 (14:36 +0200)
candi.sh
deal.II-toolchain/packages/parmetis.package
deal.II-toolchain/packages/petsc.package

index 3d5bf2db67d2e409b48152a2a6d07ce1cc36a3ff..5a12fd901f0e17aa16fb84380a8b6d5b03caedec 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -898,77 +898,79 @@ fi
 
 ############################################################################
 # Compiler variables check
-echo "Compiler Variables:"
-# Firstly test, if compiler variables are set,
-#   and if not try to set the default mpi-compiler suite
-# finally test, if compiler variables are useful.
+# Firstly test, if compiler variables are set, and if not try to set the
+# default mpi-compiler suite finally test, if compiler variables are useful.
 
-echo "-------------------------------------------------------------------------------"
+echo "--------------------------------------------------------------------------------"
+cecho ${INFO} "Compiler Variables:"
+echo
 
 # CC test
-if [ ! -n "$CC" ]; then
+if [ ! -n "${CC}" ]; then
     if builtin command -v mpicc > /dev/null; then
-        cecho ${WARN} "CC variable not set, but default mpicc found."
+        cecho ${WARN} "CC  variable not set, but default mpicc  found."
         export CC=mpicc
     fi
 fi
 
-if [ -n "$CC" ]; then
-    cecho ${INFO} "CC  = $(which $CC)"
+if [ -n "${CC}" ]; then
+    cecho ${INFO} "CC  = $(which ${CC})"
 else
-    cecho ${BAD} "CC  variable not set. Please set it with export CC  = <(MPI) C compiler>"
+    cecho ${BAD} "CC  variable not set. Please set it with \$export CC  = <(MPI) C compiler>"
 fi
 
 # CXX test
-if [ ! -n "$CXX" ]; then
+if [ ! -n "${CXX}" ]; then
     if builtin command -v mpicxx > /dev/null; then
         cecho ${WARN} "CXX variable not set, but default mpicxx found."
         export CXX=mpicxx
     fi
 fi
 
-if [ -n "$CXX" ]; then
-    cecho ${INFO} "CXX = $(which $CXX)"
+if [ -n "${CXX}" ]; then
+    cecho ${INFO} "CXX = $(which ${CXX})"
 else
-    cecho ${BAD} "CXX variable not set. Please set it with export CXX = <(MPI) C++ compiler>"
+    cecho ${BAD} "CXX variable not set. Please set it with \$export CXX = <(MPI) C++ compiler>"
 fi
 
 # FC test
-if [ ! -n "$FC" ]; then
+if [ ! -n "${FC}" ]; then
     if builtin command -v mpif90 > /dev/null; then
-        cecho ${WARN} "FC variable not set, but default mpif90 found."
+        cecho ${WARN} "FC  variable not set, but default mpif90 found."
         export FC=mpif90
     fi
 fi
 
-if [ -n "$FC" ]; then
-    cecho ${INFO} "FC  = $(which $FC)"
+if [ -n "${FC}" ]; then
+    cecho ${INFO} "FC  = $(which ${FC})"
 else
-    cecho ${BAD} "FC  variable not set. Please set it with $ export FC  = <(MPI) Fortran 90 compiler>"
+    cecho ${BAD} "FC  variable not set. Please set it with \$export FC  = <(MPI) F90 compiler>"
 fi
 
 # FF test
-if [ ! -n "$FF" ]; then
+if [ ! -n "${FF}" ]; then
     if builtin command -v mpif77 > /dev/null; then
-        cecho ${WARN} "FF variable not set, but default mpif77 found."
+        cecho ${WARN} "FF  variable not set, but default mpif77 found."
         export FF=mpif77
     fi
 fi
 
-if [ -n "$FF" ]; then
-    cecho ${INFO} "FF  = $(which $FF)"
+if [ -n "${FF}" ]; then
+    cecho ${INFO} "FF  = $(which ${FF})"
 else
-    cecho ${BAD} "FF  variable not set. Please set it with $ export FF  = <(MPI) Fortran 77 compiler>"
+    cecho ${BAD} "FF  variable not set. Please set it with \$export FF  = <(MPI) F77 compiler>"
 fi
+
 echo
 
 # Final test for compiler variables
-if [ -z "$CC" ] || [ -z "$CXX" ] || [ -z "$FC" ] || [ -z "$FF" ]; then
+if [ -z "${CC}" ] || [ -z "${CXX}" ] || [ -z "${FC}" ] || [ -z "${FF}" ]; then
     cecho ${WARN} "One or multiple compiler variables (CC,CXX,FC,FF) are not set."
-    cecho ${INFO} "Please read your platform information above carefully,"
-    cecho ${INFO} "  how you get those compilers installed and set up!"
-    cecho ${INFO} "Usually the values should be: mpicc, mpicxx, mpif90 and mpif77."
-    cecho ${WARN} "It is strongly recommended to set them to guarantee the same compilers for all dependencies."
+    cecho ${INFO} "Please read your platform information above carefully, how you get those"
+    cecho ${INFO} "compilers installed and set up! Usually the values should be:"
+    cecho ${INFO} "CC=mpicc, CXX=mpicxx, FC=mpif90, FF=mpif77"
+    cecho ${WARN} "It is strongly recommended to set them to guarantee the same compilers for all"
+    cecho ${WARN} "dependencies."
     echo
 fi
 
index 56bf695cb4fff28d31d1828e5bc3702c36bc6ef4..99cc283c0b217bc0a7a760eb7e1e760c9a016b14 100644 (file)
@@ -25,7 +25,7 @@ package_specific_build() {
     # Secondly build parmetis
     cd ..
     
-    make config prefix=${INSTALL_PATH} shared=1 cc=$CC cxx=$CXX
+    make config prefix=${INSTALL_PATH} shared=1 cc=${CC} cxx=${CXX}
     quit_if_fail "parmetis make config failed"
     
     make -j${JOBS}
index bc48cbf8389aa8dd338ee1d16a9e5828aa5e6841..d9dc2d47b22e7268be38977dd5211d1d0f334516 100644 (file)
@@ -42,24 +42,24 @@ for external_pkg in hypre; do
     CONFOPTS="${CONFOPTS} --download-${external_pkg}=1"
 done
 
-if [ ! -z "$CC" ]; then
-    CONFOPTS="${CONFOPTS} CC=$CC"
+if [ ! -z "${CC}" ]; then
+    CONFOPTS="${CONFOPTS} CC=${CC}"
 fi
 
-if [ ! -z "$CXX" ]; then
-    CONFOPTS="${CONFOPTS} CXX=$CXX"
+if [ ! -z "${CXX}" ]; then
+    CONFOPTS="${CONFOPTS} CXX=${CXX}"
 fi
 
-if [ ! -z "$FC" ]; then
-    CONFOPTS="${CONFOPTS} FC=$FC"
+if [ ! -z "${FC}" ]; then
+    CONFOPTS="${CONFOPTS} FC=${FC}"
 fi
 
-if [ ! -z "$F77" ]; then
-    CONFOPTS="${CONFOPTS} F77=$F77"
+if [ ! -z "${F77}" ]; then
+    CONFOPTS="${CONFOPTS} F77=${F77}"
 fi
 
-if [ ! -z "$F90" ]; then
-    CONFOPTS="${CONFOPTS} F90=$F90"
+if [ ! -z "${F90}" ]; then
+    CONFOPTS="${CONFOPTS} F90=${F90}"
 fi
 
 if [ ! -z "${MKL_DIR}" ]; then

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.