# 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
#########################################################################
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
# 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
#########################################################################
-# Do you want to use MKL?
+# Option {ON|OFF}: Do you want to use MKL?
MKL=OFF
# MKL_DIR=
# BLAS_DIR=
#########################################################################
-# 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
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"
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
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=""
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
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."
# 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
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 \
-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
--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' \
# 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