diff --git a/script/detect_gcc b/script/detect_gcc
index aab7f4a54774e0713aa0620de2cb39d0b1620b82..ca60c17f6e27293bd790bff628ca3cc22fd9dbdc 100755
--- a/script/detect_gcc
+++ b/script/detect_gcc
@@ -223,8 +223,16 @@ function detect_compiler()
           gpp_clang
         fi
         dgc_ret=1
-    else
+    elif [ $gpp_found -eq 1 ]; then
         gpp_clang
+    elif [ $icpc_found -eq 1 ]; then
+          CXX=icpc
+          CC=icc
+          F77=ifort
+          FC=ifort
+          dgc_compiler=icpc
+    else
+          echo "No compiler found"
     fi
 }