Use either -std=c++03 or -std=c++11

No intermediate pseudo-standards should be used when compiling.
The option -std=c++11 is used by default now.
Compile with `make defines=PUGIXML_NO_CXX11` to use -std=c++03 instead.
This commit is contained in:
Stephan Beyer 2016-01-24 14:40:44 +01:00
parent 7f91301946
commit 32f05d55ae
2 changed files with 7 additions and 6 deletions

View File

@ -4,9 +4,9 @@ os:
- linux - linux
- osx - osx
env: env:
- DEFINES=standard - DEFINES=PUGIXML_NO_CXX11
- DEFINES=PUGIXML_WCHAR_MODE - DEFINES=PUGIXML_NO_CXX11,PUGIXML_WCHAR_MODE
- DEFINES=PUGIXML_COMPACT - DEFINES=PUGIXML_NO_CXX11,PUGIXML_COMPACT
script: script:
- make test config=coverage defines=$DEFINES -j2 - make test config=coverage defines=$DEFINES -j2
- make test config=release defines=$DEFINES -j2 - make test config=release defines=$DEFINES -j2

View File

@ -47,9 +47,10 @@ ifneq ($(findstring PUGIXML_NO_EXCEPTIONS,$(defines)),)
CXXFLAGS+=-fno-exceptions CXXFLAGS+=-fno-exceptions
endif endif
ifeq ($(findstring PUGIXML_NO_CXX11,$(defines)),) ifneq ($(findstring PUGIXML_NO_CXX11,$(defines)),)
# Can't use std=c++11 since Travis-CI has gcc 4.6.3 CXXFLAGS+=-std=c++03
CXXFLAGS+=-std=c++0x else
CXXFLAGS+=-std=c++11
endif endif
OBJECTS=$(SOURCES:%=$(BUILD)/%.o) OBJECTS=$(SOURCES:%=$(BUILD)/%.o)