From 17733085736df6fbc3986bec56a9ee6fde2cc832 Mon Sep 17 00:00:00 2001
From: Stuart Campbell <campbellsi@ornl.gov>
Date: Fri, 15 Aug 2014 10:52:04 -0400
Subject: [PATCH] Modified buildscript for clang

If the jobname (only on mac for now) contains clang then
we will use clang rather than intel for the compiler

refs #10081
---
 Code/Mantid/Build/Jenkins/buildscript | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/Code/Mantid/Build/Jenkins/buildscript b/Code/Mantid/Build/Jenkins/buildscript
index 57312f0339b..73cb7317217 100755
--- a/Code/Mantid/Build/Jenkins/buildscript
+++ b/Code/Mantid/Build/Jenkins/buildscript
@@ -18,15 +18,24 @@ cmake --version
 # OS X setup steps
 ###############################################################################
 if [[ $(uname) == 'Darwin' ]]; then
-  cd $WORKSPACE/Code
-  ./fetch_Third_Party.sh
-  cd $WORKSPACE
-  # Setup environment variables
-  source /opt/intel/bin/iccvars.sh intel64
-  export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$WORKSPACE/Code/Third_Party/lib/mac64:/Library/Frameworks
-  # Make sure we pick up the Intel compiler
-  export CC=icc
-  export CXX=icpc
+  if [[ ${JOB_NAME} == *clang* ]]; then
+    # Assuming we are using the clang compiler
+    echo "Using clang/llvm compiler."
+    clang --version
+  else
+    # Assuming we are using the Intel compiler
+    cd $WORKSPACE/Code
+    ./fetch_Third_Party.sh
+    cd $WORKSPACE
+    # Setup environment variables
+    source /opt/intel/bin/iccvars.sh intel64
+    export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$WORKSPACE/Code/Third_Party/lib/mac64:/Library/Frameworks
+    # Make sure we pick up the Intel compiler
+    export CC=icc
+    export CXX=icpc
+    echo "Using Intel compiler."
+    icpc --version
+  fi
 fi
 
 ###############################################################################
-- 
GitLab