issue #2242:use -std=gnu++0x for linux and native client project

This commit is contained in:
minggo 2013-06-03 13:50:19 +08:00
parent 0a64e7a041
commit 5c1a408797
2 changed files with 8 additions and 2 deletions

View File

@ -4,8 +4,11 @@ CC = gcc
CXX = g++
# Remove -Wall, because it enables -Wunused-function, and this warning exists in webp.h
# when enable c++11. I don't know why.
# GCC 4.6 is primary platform for cocos2d v.3, because it's default compiler for Android,
# Blackberry, some Linux distributions.It supports all important features of c++11, but have
# no flag "-std=c++11" (which was turned on in version 4.7).
CCFLAGS += -MMD -Werror -fPIC
CXXFLAGS += -MMD -Werror -fPIC -std=c++11
CXXFLAGS += -MMD -Werror -fPIC -std=gnu++0x
ARFLAGS = cr
DEFINES += -DLINUX

View File

@ -10,7 +10,10 @@ NACL_AR ?= $(NACL_ARCH)-nacl-ar
NACL_CC ?= $(NACL_ARCH)-nacl-gcc
NACL_CXX ?= $(NACL_ARCH)-nacl-g++
CCFLAGS += -Wall -Werror
CXXFLAGS += -Wall -Werror -std=c++11
# GCC 4.6 is primary platform for cocos2d v.3, because it's default compiler for Android,
# Blackberry, some Linux distributions.It supports all important features of c++11, but have
# no flag "-std=c++11" (which was turned on in version 4.7).
CXXFLAGS += -Wall -Werror -std=gnu++0x
ARFLAGS = cr
THIS_MAKEFILE := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))