From da30b9efd5eb70be0d7e5630ec6a4745e6e192e9 Mon Sep 17 00:00:00 2001
From: Romain Boman <romain.boman@gmail.com>
Date: Fri, 9 Aug 2024 16:59:28 +0200
Subject: [PATCH] add use_intel_compilers function

---
 cfg/fsa-spirou/compilers.bashrc | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/cfg/fsa-spirou/compilers.bashrc b/cfg/fsa-spirou/compilers.bashrc
index 707fb53..2bf97e6 100644
--- a/cfg/fsa-spirou/compilers.bashrc
+++ b/cfg/fsa-spirou/compilers.bashrc
@@ -25,3 +25,14 @@ if [ -d /opt/intel ] ; then
     . /opt/intel/oneapi/mkl/latest/env/vars.sh
     . /opt/intel/oneapi/tbb/latest/env/vars.sh
 fi
+
+function use_intel_compilers() {
+    source /opt/intel/oneapi/compiler/latest/env/vars.sh
+    export CC=icc
+    export CXX=icpc
+    export FC=ifort
+    echo "Intel compiler enabled!"
+    echo "  CC=`which $CC`"
+    echo "  CXX=`which $CXX`"
+    echo "  FC=`which $FC`"
+}
-- 
GitLab