From fc9073289fc196d1a7ee400d703b0e92cf2f94fe Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sun, 24 Jan 2016 15:17:07 +0100 Subject: test_parse.cpp: add newline to last line This is necessary in order to comply with the C++03 standard. --- tests/test_parse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_parse.cpp b/tests/test_parse.cpp index 68fd217..bc40815 100644 --- a/tests/test_parse.cpp +++ b/tests/test_parse.cpp @@ -1181,4 +1181,4 @@ TEST(parse_embed_pcdata) CHECK_NODE_EX(doc, STR("\nvalue\n\nvalue1\nvalue2outer\ntext\n\n\n"), STR("\t"), 0); CHECK_NODE_EX(doc, STR("\n\tvalue\n\t\n\t\tvalue1\n\t\tvalue2outer\n\ttext\n\t\n\n"), STR("\t"), format_indent); } -} \ No newline at end of file +} -- cgit v1.2.3 From fb647f69a215f584f83808028653c59b7c533837 Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Tue, 26 Jan 2016 21:53:16 +0100 Subject: Let Travis CI use Ubuntu trusty This allows to perform C++11-based tests on the Linux. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a7e4840..58c5d98 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ -sudo: false language: cpp +sudo: required +dist: trusty os: - linux - osx -- cgit v1.2.3 From 6bbbdb7d7e4c34ef45b103edadbed1bf8e8b00de Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sun, 24 Jan 2016 19:52:49 +0100 Subject: Make cxxstd an argument to Makefile This determines the used C++ standard. If you do not want to use a specific C++ standard, use cxxstd=any. The default is set to c++11. The "define" PUGIXML_NO_CXX11 is removed from the Makefile since it is not used in the code anyways. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 777b82b..cd03002 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,10 @@ MAKEFLAGS+=-r config=debug defines=standard +cxxstd=c++11 +# set cxxstd=any to disable use of -std=... -BUILD=build/make-$(CXX)-$(config)-$(defines) +BUILD=build/make-$(CXX)-$(config)-$(defines)-$(cxxstd) SOURCES=src/pugixml.cpp $(filter-out tests/fuzz_%,$(wildcard tests/*.cpp)) EXECUTABLE=$(BUILD)/test @@ -47,9 +49,8 @@ ifneq ($(findstring PUGIXML_NO_EXCEPTIONS,$(defines)),) CXXFLAGS+=-fno-exceptions endif -ifeq ($(findstring PUGIXML_NO_CXX11,$(defines)),) - # Can't use std=c++11 since Travis-CI has gcc 4.6.3 - CXXFLAGS+=-std=c++0x +ifneq ($(cxxstd),any) + CXXFLAGS+=-std=$(cxxstd) endif OBJECTS=$(SOURCES:%=$(BUILD)/%.o) -- cgit v1.2.3 From e017a22fe016d3e856fb67d95ecc24cd0bd701ea Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sun, 24 Jan 2016 19:56:54 +0100 Subject: Let Travis CI perform C++98-based tests --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 58c5d98..5ee58a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,6 @@ env: script: - make test config=coverage defines=$DEFINES -j2 - make test config=release defines=$DEFINES -j2 + - make test cxxstd=c++98 defines=$DEFINES -j2 after_success: bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov -- cgit v1.2.3