diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2016-01-26 20:28:10 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2016-01-26 20:28:10 -0800 |
commit | c3d27daf8e3dc95eb7ae38e66cd827eb061f7b99 (patch) | |
tree | 326968aa46f817118e43280a1f1d966eaff46673 | |
parent | e133764f33572c9bca205b0c19fc981df48e7e15 (diff) | |
parent | e017a22fe016d3e856fb67d95ecc24cd0bd701ea (diff) |
Merge pull request #83 from ogdf/use-real-standards-only
Add cxxstd Makefile argument for testing C++ standards
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | tests/test_parse.cpp | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml index a7e4840..5ee58a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ -sudo: false language: cpp +sudo: required +dist: trusty os: - linux - osx @@ -10,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 @@ -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) 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("<node>\n<key>value</key>\n<child>\n<inner1>value1</inner1>\n<inner2>value2</inner2>outer</child>\n<two>text<data />\n</two>\n</node>\n"), STR("\t"), 0); CHECK_NODE_EX(doc, STR("<node>\n\t<key>value</key>\n\t<child>\n\t\t<inner1>value1</inner1>\n\t\t<inner2>value2</inner2>outer</child>\n\t<two>text<data />\n\t</two>\n</node>\n"), STR("\t"), format_indent); } -}
\ No newline at end of file +} |