From 51715376bf6cb5c8251ea77e799dcf194bf8efcd Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 1 Feb 2018 13:05:17 -0800 Subject: [PATCH] Use Intel icc if available on Linux. --- make-linux.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/make-linux.mk b/make-linux.mk index 37f1a8328..253a4cb73 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -1,10 +1,12 @@ # Automagically pick clang or gcc, with preference for clang # This is only done if we have not overridden these with an environment or CLI variable ifeq ($(origin CC),default) - CC=$(shell if [ -e /usr/bin/clang ]; then echo clang; else echo gcc; fi) + CC:=$(shell if [ -e /usr/bin/clang ]; then echo clang; else echo gcc; fi) + CC:=$(shell if [ -e /opt/intel/bin/icc ]; then echo /opt/intel/bin/icc -ipo -ansi-alias; else echo $(CC); fi) endif ifeq ($(origin CXX),default) - CXX=$(shell if [ -e /usr/bin/clang++ ]; then echo clang++; else echo g++; fi) + CXX:=$(shell if [ -e /usr/bin/clang++ ]; then echo clang++; else echo g++; fi) + CXX:=$(shell if [ -e /opt/intel/bin/icc ]; then echo /opt/intel/bin/icc -ipo -ansi-alias; else echo $(CXX); fi) endif INCLUDES?=