mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-30 10:57:34 +08:00
check g++'s version automally for supporting c++11
This commit is contained in:
parent
0a1c077f0d
commit
024eab9a4a
@ -15,7 +15,17 @@ OSTYPE = $(shell uname -p)
|
||||
RPATH = linux64
|
||||
|
||||
ifeq ($(CC),)
|
||||
CC = gcc
|
||||
CC = g++
|
||||
endif
|
||||
|
||||
ifeq ($(findstring g++, $(CC)), g++)
|
||||
GCC_VERSION:=$(shell echo `gcc --version|grep ^gcc|cut -d' ' -f3`)
|
||||
GCC_MAJOR:=$(shell echo "$(GCC_VERSION)" | cut -d'.' -f1)
|
||||
GCC_MINOR:=$(shell echo "$(GCC_VERSION)" | cut -d'.' -f2)
|
||||
GCC_VER:=$(shell [ $(GCC_MAJOR) -gt 4 -o \( $(GCC_MAJOR) -eq 4 -a $(GCC_MINOR) -ge 7 \) ] && echo true)
|
||||
ifeq ($(GCC_VER), true)
|
||||
CFLAGS += -std=c++11 -DACL_USE_CPP11
|
||||
endif
|
||||
endif
|
||||
|
||||
# For FreeBSD
|
||||
|
Loading…
Reference in New Issue
Block a user