Просмотр исходного кода

Use Intel icc if available on Linux.

Adam Ierymenko 8 лет назад
Родитель
Сommit
51715376bf
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      make-linux.mk

+ 4 - 2
make-linux.mk

@@ -1,10 +1,12 @@
 # Automagically pick clang or gcc, with preference for clang
 # 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
 # This is only done if we have not overridden these with an environment or CLI variable
 ifeq ($(origin CC),default)
 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
 endif
 ifeq ($(origin CXX),default)
 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
 endif
 
 
 INCLUDES?=
 INCLUDES?=