]> https://gitweb.dealii.org/ - candi.git/commitdiff
Unification ON|OFF (#176)
authorFabian Castelli <50630942+gfcas@users.noreply.github.com>
Thu, 27 May 2021 08:56:55 +0000 (10:56 +0200)
committerGitHub <noreply@github.com>
Thu, 27 May 2021 08:56:55 +0000 (10:56 +0200)
* Option CLEAN_BUILD

* Option native optimizations

* Option build examples

* Option stable build

* Update comments

candi.cfg
candi.sh
deal.II-toolchain/packages/dealii.package
deal.II-toolchain/packages/petsc.package
deal.II-toolchain/platforms/deprecated/ubuntu14.platform

index fd67358fe15fb27c52a4df49e8b931052d757ffc..75ad77eeebbcec52f0ce0629baf4bbd88bbf1f20 100644 (file)
--- a/candi.cfg
+++ b/candi.cfg
@@ -2,7 +2,9 @@
 
 # Meta-project to build
 PROJECT=deal.II-toolchain
-CLEAN_BUILD=false
+
+# Option {ON|OFF}: Use fresh build directory by remove existing ones?
+CLEAN_BUILD=OFF
 
 #########################################################################
 
@@ -25,14 +27,14 @@ INSTALL_PATH=${PREFIX_PATH}
 MIRROR="https://tjhei.info/candi-mirror/ https://cecas.clemson.edu/dealii/mirror/"
 
 #########################################################################
-#Choose configuration and components of deal.II
+# Choose additional configuration and components of deal.II
 DEAL_CONFOPTS=""
 
-# enable machine-specific optimizations (implies -march=native etc.)?
-#NATIVE_OPTIMIZATIONS=true
+# Option {ON|OFF}: Enable machine-specific optimizations (e.g. -march=native)?
+NATIVE_OPTIMIZATIONS=OFF
 
-# enable building of dealii examples
-BUILD_EXAMPLES=true
+# Option {ON|OFF}: Enable building of dealii examples?
+BUILD_EXAMPLES=ON
 
 # Choose the python interpreter to use. We pick python2, python3,
 # python in that order by default. If you want to override this
@@ -77,13 +79,12 @@ PACKAGES="${PACKAGES} dealii"
 # Install the following deal.II version:
 DEAL_II_VERSION=v9.2.0
 
-# Would you like to build stable version of deal.II?
-# If STABLE_BUILD=false, then the development version of deal.II will be
+# Option {ON|OFF}: Would you like to build stable version of deal.II?
+# If STABLE_BUILD=OFF, then the development version of deal.II will be
 # installed.
-STABLE_BUILD=true
-#STABLE_BUILD=false
+STABLE_BUILD=ON
 
-if [ ${STABLE_BUILD} = "false" ]; then
+if [ ${STABLE_BUILD} = OFF ]; then
     DEAL_II_VERSION=master
 fi
 
@@ -96,7 +97,7 @@ TRILINOS_MAJOR_VERSION=AUTO
 
 #########################################################################
 
-# Do you want to use MKL?
+# Option {ON|OFF}: Do you want to use MKL?
 MKL=OFF
 # MKL_DIR=
 # BLAS_DIR=
@@ -111,8 +112,8 @@ MKL=OFF
 
 #########################################################################
 
-# If you want to change the source code of one or multiple packages
-# switch on the developer mode to avoid a package fetch and unpack.
+# Option {ON|OFF}: If you want to change the source code of one or multiple
+# packages switch on the developer mode to avoid a package fetch and unpack.
 # Note: a previous run of candi with the same settings must be done without
 #       this mode!
 DEVELOPER_MODE=OFF
index d00864625388edcfaa981e0eb2410c835f17dd21..8ebe5af226c6036af924c0dc40b7640f571af923 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -350,7 +350,7 @@ package_fetch () {
             cd ..
         fi
 
-        if [ ${STABLE_BUILD} = true ]; then
+        if [ ${STABLE_BUILD} = ON ]; then
             cd ${EXTRACTSTO}
             git checkout ${VERSION} --force
             quit_if_fail "candi: git checkout ${VERSION} --force failed"
@@ -458,7 +458,7 @@ package_build() {
     default BUILDDIR=${BUILD_PATH}/${NAME}
 
     # Clean the build directory if specified
-    if [ -d ${BUILDDIR} ] && [ ${CLEAN_BUILD} = "true" ]; then
+    if [ -d ${BUILDDIR} ] && [ ${CLEAN_BUILD} = ON ]; then
         rm -rf ${BUILDDIR}
     fi
 
@@ -671,8 +671,8 @@ default BUILD_PATH=${PREFIX_PATH}/tmp/build
 default INSTALL_PATH=${PREFIX_PATH}
 default CONFIGURATION_PATH=${INSTALL_PATH}/configuration
 
-default CLEAN_BUILD=false
-default STABLE_BUILD=true
+default CLEAN_BUILD=OFF
+default STABLE_BUILD=ON
 default DEVELOPER_MODE=OFF
 
 default PACKAGES_OFF=""
@@ -847,7 +847,7 @@ elif [ ${DEVELOPER_MODE} = "ON" ]; then
     cecho ${BAD} "source files from: $(prettify_dir ${UNPACK_PATH})"
     echo
 else
-    cecho ${BAD} "candi: bad variable: DEVELOPER_MODE={OFF|ON}; (your specified option is = ${DEVELOPER_MODE})"
+    cecho ${BAD} "candi: bad variable: DEVELOPER_MODE={ON|OFF}; (your specified option is = ${DEVELOPER_MODE})"
     exit 1
 fi
 
@@ -869,7 +869,7 @@ echo
 
 
 echo "-------------------------------------------------------------------------------"
-if [ ${STABLE_BUILD} = true ]; then
+if [ ${STABLE_BUILD} = ON ]; then
     cecho ${INFO} "Building stable releases of ${PROJECT} packages."
 else
     cecho ${WARN} "Building development versions of ${PROJECT} packages."
@@ -1096,7 +1096,7 @@ for PACKAGE in ${PACKAGES[@]}; do
 
     # Turn to a stable version of the package if that's what the user
     # wants and it exists
-    if [ ${STABLE_BUILD} = true ] && [ -e ${PROJECT}/packages/${PACKAGE}-stable.package ]; then
+    if [ ${STABLE_BUILD} = ON ] && [ -e ${PROJECT}/packages/${PACKAGE}-stable.package ]; then
         source ${PROJECT}/packages/${PACKAGE}-stable.package
     fi
 
index 54991a9e5db75bde3949dc334c173022270a33b1..0ef317c2ecb35822efcac42f9b448efa28e714a3 100644 (file)
@@ -10,10 +10,10 @@ BUILDDIR=${BUILD_PATH}/deal.II-${VERSION}
 INSTALL_PATH=${ORIG_INSTALL_PATH}/deal.II-${VERSION}
 
 ################################################################################
-# Please do not change the line below!
+# Please do not change the lines below!
 
 ################################################################################
-#Choose general configuration and components of deal.II
+# Choose general configuration and components of deal.II
 
 CONFOPTS=" \
 -D CMAKE_BUILD_TYPE=DebugRelease \
@@ -27,18 +27,16 @@ CONFOPTS=" \
 -D DEAL_II_WITH_ZLIB:BOOL=ON"
 
 # Choice of whether to build the dealii examples
-if [ "${BUILD_EXAMPLES}" = "true" ]; then
+if [ ${BUILD_EXAMPLES} = ON ] || [ ${BUILD_EXAMPLES} = OFF ]; then
     CONFOPTS="${CONFOPTS} \
-      -D DEAL_II_COMPONENT_EXAMPLES:BOOL=ON"
-elif [ "${BUILD_EXAMPLES}" = "false" ]; then
-    CONFOPTS="${CONFOPTS} \
-      -D DEAL_II_COMPONENT_EXAMPLES:BOOL=OFF"
+      -D DEAL_II_COMPONENT_EXAMPLES:BOOL=${BUILD_EXAMPLES}"
 else
-    cecho ${BAD} "candi: bad variable: BUILD_EXAMPLES={false|true}; (your specified option is = ${BUILD_EXAMPLES})"
+    cecho ${BAD} "candi: bad variable: BUILD_EXAMPLES={ON|OFF}; (your specified option is = ${BUILD_EXAMPLES})"
     exit 1
 fi
 
-if [ "${NATIVE_OPTIMIZATIONS}" = "true" ]; then
+# Choice of whether native compiler optimizations should be enabled
+if [ ${NATIVE_OPTIMIZATIONS} = ON ]; then
     CONFOPTS="${CONFOPTS} \
       -D CMAKE_CXX_FLAGS='-march=native'"
 fi
index e54dad956ed9bb9cf99bd1b2d6dd1519cae5f4bd..bc48cbf8389aa8dd338ee1d16a9e5828aa5e6841 100644 (file)
@@ -30,7 +30,7 @@ CONFOPTS="
   --with-64-bit-indices=0
 "
 
-if [ "${NATIVE_OPTIMIZATIONS}" = "true" ]; then
+if [ ${NATIVE_OPTIMIZATIONS} = ON ]; then
     CONFOPTS="${CONFOPTS} \
       COPTFLAGS='-O3 -march=native -mtune=native' \
       CXXOPTFLAGS='-O3 -march=native -mtune=native' \
index 1ffa4ff19ce102060d23cf7f50351fcab5670292..1fc6f06375636e6ef764ab2cf06cad4574710dc4 100644 (file)
@@ -20,7 +20,7 @@
 # version number is not set to AUTO.
 # The last point is due to own compilers (e.g. intel) which support
 # Trilinos 12.
-if [ ${STABLE_BUILD} == "true" ] && [ ${DEAL_II_VERSION} == "v8.3.0" ] && [ ${TRILINOS_MAJOR_VERSION} == "AUTO" ]; then
+if [ ${STABLE_BUILD} = ON ] && [ ${DEAL_II_VERSION} == "v8.3.0" ] && [ ${TRILINOS_MAJOR_VERSION} == "AUTO" ]; then
   TRILINOS_MAJOR_VERSION=11
 fi
 

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.