From 0a64e7a041701d572b9c3b72bd0999d9aaf1c355 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 31 May 2013 15:18:20 +0800 Subject: [PATCH] enable c++11 for linux and natvie client projects --- cocos2dx/proj.linux/cocos2dx.mk | 6 ++++-- cocos2dx/proj.nacl/cocos2dx.mk | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cocos2dx/proj.linux/cocos2dx.mk b/cocos2dx/proj.linux/cocos2dx.mk index 37d6475fd9..ba630aa290 100644 --- a/cocos2dx/proj.linux/cocos2dx.mk +++ b/cocos2dx/proj.linux/cocos2dx.mk @@ -2,8 +2,10 @@ all: CC = gcc CXX = g++ -CCFLAGS += -MMD -Wall -Werror -fPIC -CXXFLAGS += -MMD -Wall -Werror -fPIC +# Remove -Wall, because it enables -Wunused-function, and this warning exists in webp.h +# when enable c++11. I don't know why. +CCFLAGS += -MMD -Werror -fPIC +CXXFLAGS += -MMD -Werror -fPIC -std=c++11 ARFLAGS = cr DEFINES += -DLINUX diff --git a/cocos2dx/proj.nacl/cocos2dx.mk b/cocos2dx/proj.nacl/cocos2dx.mk index 53d5508ffe..8253c4259e 100644 --- a/cocos2dx/proj.nacl/cocos2dx.mk +++ b/cocos2dx/proj.nacl/cocos2dx.mk @@ -10,7 +10,7 @@ NACL_AR ?= $(NACL_ARCH)-nacl-ar NACL_CC ?= $(NACL_ARCH)-nacl-gcc NACL_CXX ?= $(NACL_ARCH)-nacl-g++ CCFLAGS += -Wall -Werror -CXXFLAGS += -Wall -Werror +CXXFLAGS += -Wall -Werror -std=c++11 ARFLAGS = cr THIS_MAKEFILE := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))