Skip to content
Snippets Groups Projects
Commit 6a9be983 authored by deuce's avatar deuce
Browse files

When using clang, override CXX to 'c++' if CC is 'cc' and 'clang++' if 'cc'

is 'clang'
parent 52b690f9
No related branches found
No related tags found
No related merge requests found
......@@ -158,6 +158,15 @@ endif
CFLAGS += -MMD
CC ?= gcc
CCPRE ?= ${shell if [ `echo __clang__ | $(CC) -E - | grep -v '^\#'` != __clang__ ] ; then echo clang ; elif [ `echo __INTEL_COMPILER | $(CC) -E - | grep -v '^\#'` != __INTEL_COMPILER ] ; then echo icc ; else echo gcc ; fi}
ifeq ($(CCPRE),clang)
ifeq ($(CC),cc)
CXX := c++
else
ifeq ($(CC),clang)
CXX := clang++
endif
endif
endif
ifdef BUILD_DEPENDS
CC := $(SRC_ROOT)/build/mkdep -a
CXX := $(SRC_ROOT)/build/mkdep -a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment