Build examples without global UDLs
This commit is contained in:
parent
0edd02a1f1
commit
852035043d
@ -14,13 +14,17 @@ cxx_standard = $(lastword c++11 $(filter c++%, $(subst ., ,$1)))
|
|||||||
# create output from a stand-alone example file
|
# create output from a stand-alone example file
|
||||||
%.output: %.cpp
|
%.output: %.cpp
|
||||||
@echo "standard $(call cxx_standard $(<:.cpp=))"
|
@echo "standard $(call cxx_standard $(<:.cpp=))"
|
||||||
$(MAKE) $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) -Wno-deprecated-declarations"
|
$(MAKE) $(<:.cpp=) \
|
||||||
|
CPPFLAGS="-I $(SRCDIR) -DJSON_USE_GLOBAL_UDLS=0" \
|
||||||
|
CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) -Wno-deprecated-declarations"
|
||||||
./$(<:.cpp=) > $@
|
./$(<:.cpp=) > $@
|
||||||
rm $(<:.cpp=)
|
rm $(<:.cpp=)
|
||||||
|
|
||||||
# compare created output with current output of the example files
|
# compare created output with current output of the example files
|
||||||
%.test: %.cpp
|
%.test: %.cpp
|
||||||
$(MAKE) $(<:.cpp=) CPPFLAGS="-I $(SRCDIR)" CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) -Wno-deprecated-declarations"
|
$(MAKE) $(<:.cpp=) \
|
||||||
|
CPPFLAGS="-I $(SRCDIR) -DJSON_USE_GLOBAL_UDLS=0" \
|
||||||
|
CXXFLAGS="-std=$(call cxx_standard,$(<:.cpp=)) -Wno-deprecated-declarations"
|
||||||
./$(<:.cpp=) > $@
|
./$(<:.cpp=) > $@
|
||||||
diff $@ $(<:.cpp=.output)
|
diff $@ $(<:.cpp=.output)
|
||||||
rm $(<:.cpp=) $@
|
rm $(<:.cpp=) $@
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user