From 95b7dbb1ea232b3b450ea9d7c8ddfe75a185a407 Mon Sep 17 00:00:00 2001 From: "Matthew R. Becker" Date: Tue, 21 Mar 2017 22:05:09 -0500 Subject: [PATCH] ENH add gcc/g++ before clang for macs (#2125) * ENH add gcc/g++ before clang for macs - will default to clang anyways and supports separate gcc installs * BUG missed a ) - :( --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 20776577c..afb003912 100644 --- a/Makefile +++ b/Makefile @@ -43,8 +43,8 @@ endif # it is useful for pip install compiling-on-the-fly OS := $(shell uname) ifeq ($(OS), Darwin) -export CC = $(if $(shell which gcc-6),gcc-6,$(if $(shell which gcc-mp-6), gcc-mp-6, clang)) -export CXX = $(if $(shell which g++-6),g++-6,$(if $(shell which g++-mp-6),g++-mp-6, clang++)) +export CC = $(if $(shell which gcc-6),gcc-6,$(if $(shell which gcc-mp-6), gcc-mp-6, $(if $(shell which gcc), gcc, clang))) +export CXX = $(if $(shell which g++-6),g++-6,$(if $(shell which g++-mp-6),g++-mp-6, $(if $(shell which g++), g++, clang++))) endif export LDFLAGS= -pthread -lm $(ADD_LDFLAGS) $(DMLC_LDFLAGS) $(PLUGIN_LDFLAGS)