Skip to content

Commit

Permalink
Refs #10972. only run grep if the file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsteve committed Feb 9, 2015
1 parent ff3b421 commit ab56003
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Code/Mantid/Build/Jenkins/buildscript
Expand Up @@ -21,10 +21,12 @@ if [[ ${JOB_NAME} == *clang* ]]; then
clang --version
export CC=clang
export CXX=clang++
COMPILERFILEPATH=`grep 'CMAKE_CXX_COMPILER:FILEPATH' $WORKSPACE/build/CMakeCache.txt 2>/dev/null`
if [[ $COMPILERFILEPATH != *clang++* ]]; then
# Removing the build directory entirely guarantees clang is used.
rm -rf $WORKSPACE/build
if [[ -e $WORKSPACE/build/CMakeCache.txt ]]; then
COMPILERFILEPATH=`grep 'CMAKE_CXX_COMPILER:FILEPATH' $WORKSPACE/build/CMakeCache.txt`
if [[ $COMPILERFILEPATH != *clang++* ]]; then
# Removing the build directory entirely guarantees clang is used.
rm -rf $WORKSPACE/build
fi
fi
fi

Expand Down

0 comments on commit ab56003

Please sign in to comment.