INSTALL_PATH=${INSTALL_PATH}/${NAME}
+# check candi environment
+if [ -z "${PLATFORM_OSTYPE}" ]; then
+ cecho ${BAD} "Error: (internal): variable PLATFORM_OSTYPE not set or empty"
+ exit 1
+fi
+
package_specific_build() {
cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
package_specific_register () {
export METIS_DIR=${INSTALL_PATH}
export PARMETIS_DIR=${INSTALL_PATH}
+
+ if [ ${PLATFORM_OSTYPE} == macos ]; then
+ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
+ fi
}
package_specific_conf () {
export METIS_DIR=${INSTALL_PATH}
export PARMETIS_DIR=${INSTALL_PATH}
" >> $CONFIG_FILE
+
+ if [ ${PLATFORM_OSTYPE} == macos ]; then
+ echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
+" >> $CONFIG_FILE
+ fi
}
BUILDCHAIN=cmake
INSTALL_PATH=${INSTALL_PATH}/${NAME}
+# check candi environment
+if [ -z "${LDSUFFIX}" ]; then
+ cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty"
+ exit 1
+fi
+
+if [ -z "${PLATFORM_OSTYPE}" ]; then
+ cecho ${BAD} "Error: (internal): variable PLATFORM_OSTYPE not set or empty"
+ exit 1
+fi
+
+# set up
CONFOPTS=" \
+ $CONFOPTS \
-D TPL_PARMETIS_INCLUDE_DIRS:PATH=${PARMETIS_DIR}/include \
- -D TPL_PARMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.so \
+ -D TPL_PARMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.${LDSUFFIX} \
-D CMAKE_C_FLAGS:STRING=\"-std=c99 -fPIC\" \
-D BUILD_SHARED_LIBS:BOOL=ON"
package_specific_register () {
export SUPERLU_DIR=${INSTALL_PATH}
+
+ if [ ${PLATFORM_OSTYPE} == macos ]; then
+ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
+ fi
}
package_specific_conf () {
echo "
export SUPERLU_DIR=${INSTALL_PATH}
" >> $CONFIG_FILE
+
+ if [ ${PLATFORM_OSTYPE} == macos ]; then
+ echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
+" >> $CONFIG_FILE
+ fi
}
# Add ParMETIS, if present
if [ ! -z "${PARMETIS_DIR}" ]; then
cecho ${INFO} "trilinos: configuration with ParMETIS"
+
+ if [ -z "${LDSUFFIX}" ]; then
+ cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty"
+ exit 1
+ fi
+
CONFOPTS="\
${CONFOPTS} \
-D TPL_ENABLE_ParMETIS:BOOL=ON \
- -D TPL_ParMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.so \
+ -D TPL_ParMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.${LDSUFFIX} \
-D TPL_ParMETIS_INCLUDE_DIRS:PATH=${PARMETIS_DIR}/include"
+###### TODO? -D HAVE_PARMETIS_VERSION_4_0_3=ON"
fi
# Add SuperLU_dist, if present
if [ ! -z "${SUPERLU_DIR}" ]; then
cecho ${INFO} "trilinos: configuration with SuperLU_dist"
- # we need to disable complex support in teuchos, see https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
+ if [ -z "${LDSUFFIX}" ]; then
+ cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty"
+ exit 1
+ fi
+
+ # we need to disable complex support in teuchos, see
+ # https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
CONFOPTS="\
${CONFOPTS} \
-D TPL_ENABLE_SuperLUDist:BOOL=ON \
-D Teuchos_ENABLE_COMPLEX:BOOL=OFF \
- -D TPL_SuperLUDist_LIBRARIES:FILEPATH=${SUPERLU_DIR}/lib/libsuperlu_dist.so \
+ -D TPL_SuperLUDist_LIBRARIES:FILEPATH=${SUPERLU_DIR}/lib/libsuperlu_dist.${LDSUFFIX} \
-D SuperLUDist_INCLUDE_DIRS:PATH=${SUPERLU_DIR}/include \
-D HAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON \
-D HAVE_SUPERLUDIST_ENUM_NAMESPACE:BOOL=ON"