Skip to content

Commit

Permalink
Merge pull request #1179 from DARMA-tasking/1156-check-ccache-existance
Browse files Browse the repository at this point in the history
#1156: check if ccache exists before calling it
  • Loading branch information
jstrzebonski authored Dec 8, 2020
2 parents dd40cd9 + e892aab commit c86eb77
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,18 @@ else
target=${3:-install}
fi

echo -e "===\n=== ccache statistics before build\n==="
ccache -s
if hash ccache &>/dev/null
then
use_ccache=true
fi

if test "$use_ccache"
then
{ echo -e "===\n=== ccache statistics before build\n==="; } 2>/dev/null
ccache -s
else
{ echo -e "===\n=== ccache not found, compiling without it\n==="; } 2>/dev/null
fi

mkdir -p "${build_dir}"
pushd "${build_dir}"
Expand All @@ -34,7 +44,7 @@ fi

if test -d "${source_dir}/lib/detector"
then
echo "Detector already in lib... not downloading, building, and installing"
{ echo "Detector already in lib... not downloading, building, and installing"; } 2>/dev/null
else
git clone -b "${detector_rev}" --depth 1 https://github.com/DARMA-tasking/detector.git
export DETECTOR=$PWD/detector
Expand All @@ -51,7 +61,7 @@ fi

if test -d "${source_dir}/lib/checkpoint"
then
echo "Checkpoint already in lib... not downloading, building, and installing"
{ echo "Checkpoint already in lib... not downloading, building, and installing"; } 2>/dev/null
else
if test "${VT_DOXYGEN_ENABLED:-0}" -eq 1
then
Expand All @@ -74,7 +84,7 @@ else
fi
fi

if test ${VT_ZOLTAN_ENABLED:-0} -eq 1
if test "${VT_ZOLTAN_ENABLED:-0}" -eq 1
then
export ZOLTAN_CONFIG=${ZOLTAN_DIR:-""}
fi
Expand Down Expand Up @@ -128,7 +138,7 @@ then
cd ../

"$MCSS/documentation/doxygen.py" Doxyfile-mcss
cp -R docs "$GHPAGE"
cp -R docs "$GHPAGE"
cd "$GHPAGE"
git config --global user.email "jliffla@sandia.gov"
git config --global user.name "Jonathan Lifflander"
Expand All @@ -139,5 +149,8 @@ else
time cmake --build . --target "${target}"
fi

echo -e "===\n=== ccache statistics after build\n==="
ccache -s
if test "$use_ccache"
then
{ echo -e "===\n=== ccache statistics after build\n==="; } 2>/dev/null
ccache -s
fi

0 comments on commit c86eb77

Please sign in to comment.