Skip to content

Commit

Permalink
Revert "CONFIG: Clean up scripts"
Browse files Browse the repository at this point in the history
--- Fails on github actions for some reason...

This reverts commit 1512702.
  • Loading branch information
gsjaardema committed Oct 27, 2022
1 parent 1512702 commit cc68368
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 49 deletions.
28 changes: 6 additions & 22 deletions cmake-config
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
#! /usr/bin/env bash

if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi

CXX_WARNING_FLAGS=""
C_WARNING_FLAGS=""
F77_WARNING_FLAGS=""
FFLAGS=""
SANITIZE=""
EXTRA_LIB=""
KOKKOS_SYMBOLS=""
MPI_SYMBOLS=""
FAODEL_SYMBOLS=""
MPI_BIN=""

set -o errexit
set -o nounset
set -o pipefail

# Text color variables
if [[ $TERM != *"xterm"* ]]; then
export TERM=dumb
Expand All @@ -30,7 +13,7 @@ txtcyn=$(tput setaf 6) # Cyan
#txtwht=$(tput setaf 7) # White
txtrst=$(tput sgr0) # Text reset

if [[ "${TRAVIS:-false}" == "true" ]]
if [ "${TRAVIS}" == "true" ]
then
BUILDDIR=${1:-build}
mkdir $BUILDDIR && cd $BUILDDIR
Expand All @@ -40,7 +23,7 @@ fi

### The following assumes you are building in a subdirectory of ACCESS Root
### If not, then define "ACCESS" to point to the root of the SEACAS source code.
if [[ "${ACCESS:-""}" == "" ]]
if [ "$ACCESS" == "" ]
then
ACCESS=$(cd ..; pwd)
fi
Expand All @@ -52,11 +35,11 @@ function check_valid()
{
if [ "${!1}" == "YES" ] || [ "${!1}" == "ON" ]; then
echo "YES"
return 0
return 1
fi
if [ "${!1}" == "NO" ] || [ "${!1}" == "OFF" ]; then
echo "NO"
return 0
return 1
fi
echo "Invalid value for $1 (${!1}) -- Must be ON, YES, NO, or OFF"
exit 1
Expand Down Expand Up @@ -92,7 +75,7 @@ METIS_PATH=${METIS_PATH:-${INSTALL_PATH}}
PARMETIS_PATH=${PARMETIS_PATH:-${INSTALL_PATH}}

### Set to ON for parallel compile; otherwise OFF for serial (default)
if [ "${MPI:-""}" = "" ]
if [ "${MPI}" = "" ]
then
netcdf_parallel=$($NETCDF_PATH/bin/nc-config --has-parallel)
if [ "${netcdf_parallel}" == "yes" ]
Expand Down Expand Up @@ -515,6 +498,7 @@ ${EXTRA_LIB} \
-D TPL_ENABLE_Pamgen:BOOL=OFF \
-D TPL_ENABLE_fmt:BOOL=ON \
-D TPL_ENABLE_Pthread:BOOL=${THREADSAFE} \
${THREAD_SAFE_OPT} \
-D TPL_ENABLE_X11:BOOL=${HAVE_X11} \
\
-D SEACASExodus_ENABLE_THREADSAFE:BOOL=${THREADSAFE} \
Expand Down
47 changes: 20 additions & 27 deletions install-tpl.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#! /usr/bin/env bash

# Following fails on some 'make installs' due to sub-scripts doing a 'mkdir' on existing directories...
# set -o errexit
set -o nounset
set -o pipefail

if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi

# Text color variables
if [[ $TERM != *"xterm"* ]]; then
export TERM=dumb
Expand Down Expand Up @@ -34,11 +27,11 @@ function check_valid()
{
if [ "${!1}" == "YES" ] || [ "${!1}" == "ON" ]; then
echo "YES"
return 0
return 1
fi
if [ "${!1}" == "NO" ] || [ "${!1}" == "OFF" ]; then
echo "NO"
return 0
return 1
fi
echo "${txtred}Invalid value for $1 (${!1}) -- Must be ON, YES, NO, or OFF${txtrst}"
exit 1
Expand All @@ -61,7 +54,7 @@ DEBUG=$(check_valid DEBUG)
# Shared libraries or static libraries?
# For CRAY, must explicitly specify SHARED=YES, or it will default to NO
# All other platforms default to SHARED=YES
if [ "${CRAY:-NO}" == "YES" ]
if [ "$CRAY" == "YES" ]
then
SHARED="${SHARED:-NO}"
else
Expand Down Expand Up @@ -249,7 +242,7 @@ then
then
echo "${txtgrn}+++ Configuring, Building, and Installing...${txtrst}"
cd libaec-${szip_version} || exit
mkdir -p build
mkdir build
cd build || exit

CRAY=${CRAY} SHARED=${SHARED} DEBUG=${DEBUG} MPI=${MPI} bash -x ../../runcmake.sh
Expand Down Expand Up @@ -291,7 +284,7 @@ else
then
echo "${txtgrn}+++ Configuring, Building, and Installing...${txtrst}"
cd szip-${szip_version} || exit
# mkdir -p build
# mkdir build
# cd build || exit

./configure --prefix=${INSTALL_PATH}
Expand Down Expand Up @@ -339,7 +332,7 @@ then
cd zlib-ng || exit
git checkout ${zlib_ng_version}
rm -rf build
mkdir -p build
mkdir build
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} -DZLIB_COMPAT=YES .
if [[ $? != 0 ]]
then
Expand Down Expand Up @@ -444,7 +437,7 @@ then
echo "${txtgrn}+++ Configuring, Building, and Installing...${txtrst}"
cd hdf5-${hdf_version} || exit
rm -rf build
mkdir -p build
mkdir build
cd build || exit
CRAY=${CRAY} H5VERSION=${H5VERSION} DEBUG=${DEBUG} SHARED=${SHARED} NEEDS_ZLIB=${NEEDS_ZLIB} NEEDS_SZIP=${NEEDS_SZIP} MPI=${MPI} bash -x ../../runcmake.sh
#CRAY=${CRAY} H5VERSION=${H5VERSION} DEBUG=${DEBUG} SHARED=${SHARED} NEEDS_ZLIB=${NEEDS_ZLIB} NEEDS_SZIP=${NEEDS_SZIP} MPI=${MPI} bash ../runconfigure.sh
Expand All @@ -461,9 +454,9 @@ then
fi
fi
# Create default plugin directory...
mkdir -p ${INSTALL_PATH}/lib/hdf5
mkdir -p ${INSTALL_PATH}/lib/hdf5/lib
mkdir -p ${INSTALL_PATH}/lib/hdf5/lib/plugin
mkdir ${INSTALL_PATH}/lib/hdf5
mkdir ${INSTALL_PATH}/lib/hdf5/lib
mkdir ${INSTALL_PATH}/lib/hdf5/lib/plugin
else
echo "${txtylw}+++ HDF5 already installed. Skipping download and installation.${txtrst}"
fi
Expand Down Expand Up @@ -543,7 +536,7 @@ then
git checkout $net_version
fi
rm -rf build
mkdir -p build
mkdir build
cd build || exit
export HDF5_PLUGIN_PATH=${INSTALL_PATH}/lib/hdf5/lib/plugin
CRAY=${CRAY} SHARED=${SHARED} DEBUG=${DEBUG} NEEDS_ZLIB=${NEEDS_ZLIB} MPI=${MPI} bash -x ../../runcmake.sh
Expand Down Expand Up @@ -584,7 +577,7 @@ then
cd CGNS || exit
git checkout v4.3.0
rm -rf build
mkdir -p build
mkdir build
cd build || exit
CRAY=${CRAY} SHARED=${SHARED} DEBUG=${DEBUG} NEEDS_ZLIB=${NEEDS_ZLIB} MPI=${MPI} bash ../../runcmake.sh
if [[ $? != 0 ]]
Expand Down Expand Up @@ -712,7 +705,7 @@ then
cd matio || exit
git checkout ${matio_version}
rm -rf build
mkdir -p build
mkdir build
cd build || exit
CRAY=${CRAY} SHARED=${SHARED} DEBUG=${DEBUG} NEEDS_ZLIB=${NEEDS_ZLIB} bash -x ../../runcmake.sh
if [[ $? != 0 ]]
Expand Down Expand Up @@ -755,7 +748,7 @@ then
cd fmt || exit
git checkout ${fmt_version}
rm -rf build
mkdir -p build
mkdir build
cd build || exit
cmake -DCMAKE_CXX_COMPILER:FILEPATH=${CXX} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PATH} -DCMAKE_INSTALL_LIBDIR:PATH=lib -DFMT_TEST:BOOL=OFF -DBUILD_SHARED_LIBS=${SHARED} ..
if [[ $? != 0 ]]
Expand Down Expand Up @@ -800,7 +793,7 @@ then
echo "${txtgrn}+++ Configuring, Building, and Installing...${txtrst}"
cd kokkos-${kokkos_version} || exit
rm -rf build
mkdir -p build
mkdir build
cd build || exit
CUDA=${CUDA} SHARED=${SHARED} DEBUG=${DEBUG} MPI=${MPI} bash ../../runcmake.sh
if [[ $? != 0 ]]
Expand Down Expand Up @@ -842,7 +835,7 @@ then
cd ADIOS2 || exit
git checkout v2.5.0
rm -rf build
mkdir -p build
mkdir build
cd build || exit
CRAY=${CRAY} SHARED=${SHARED} MPI=${MPI} DEBUG=${DEBUG} bash -x ../../runcmake.sh
if [[ $? != 0 ]]
Expand Down Expand Up @@ -884,7 +877,7 @@ then
cd catalyst || exit
git checkout master #todo: a specific version
rm -rf build
mkdir -p build
mkdir build
cd build || exit
CRAY=${CRAY} SHARED=${SHARED} MPI=${MPI} DEBUG=${DEBUG} bash -x ../../runcmake.sh
if [[ $? != 0 ]]
Expand Down Expand Up @@ -926,7 +919,7 @@ then
cd googletest || exit
git checkout release-1.11.0
rm -rf build
mkdir -p build
mkdir build
cd build || exit
CRAY=${CRAY} SHARED=${SHARED} DEBUG=${DEBUG} bash -x ../../runcmake.sh
if [[ $? != 0 ]]
Expand Down Expand Up @@ -1005,7 +998,7 @@ then
if [ "$BUILD" == "YES" ]
then
echo "${txtgrn}+++ Configuring, Building, and Installing...${txtrst}"
mkdir -p ${faodel_base}/build
mkdir ${faodel_base}/build
cd ${faodel_base}/build || exit
echo "------------- ${faodel_base}"
echo "------------- $(pwd)"
Expand Down Expand Up @@ -1037,7 +1030,7 @@ then
cd $ACCESS || exit
CEREAL_DIR="TPL/cereal"
if [ ! -d "${CEREAL_DIR}" ]; then
mkdir -p ${CEREAL_DIR}
mkdir ${CEREAL_DIR}
fi
cd ${CEREAL} || exit
if [ "$DOWNLOAD" == "YES" ]
Expand Down

0 comments on commit cc68368

Please sign in to comment.