summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStephan Beyer <s-beyer@gmx.net>2016-01-24 19:52:49 +0100
committerStephan Beyer <s-beyer@gmx.net>2016-01-26 22:14:58 +0100
commit6bbbdb7d7e4c34ef45b103edadbed1bf8e8b00de (patch)
treed0a03c8af21faebd6ac7be4125b365b0d6a52ba0 /Makefile
parentfb647f69a215f584f83808028653c59b7c533837 (diff)
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.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files 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)