diff options
Diffstat (limited to 'xsd/tests/cxx/parser')
67 files changed, 783 insertions, 193 deletions
diff --git a/xsd/tests/cxx/parser/built-in/driver.cxx b/xsd/tests/cxx/parser/built-in/driver.cxx index 11cae41..2791387 100644 --- a/xsd/tests/cxx/parser/built-in/driver.cxx +++ b/xsd/tests/cxx/parser/built-in/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/built-in/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test built-in type parsing. @@ -24,7 +23,7 @@ struct any_type_pimpl: xml_schema::any_type_pimpl } virtual void - _start_any_element (ro_string const&, + _start_any_element (ro_string const&, ro_string const& n, ro_string const*) { @@ -278,14 +277,14 @@ struct type_pimpl: type_pskel } virtual void - base64_binary (std::auto_ptr<xml_schema::buffer> v) + base64_binary (XSD_AUTO_PTR<xml_schema::buffer> v) { std::string tmp (v->data (), v->size ()); cout << "'" << tmp << "'" << endl; } virtual void - hex_binary (std::auto_ptr<xml_schema::buffer> v) + hex_binary (XSD_AUTO_PTR<xml_schema::buffer> v) { std::string tmp (v->data (), v->size ()); cout << "'" << tmp << "'" << endl; diff --git a/xsd/tests/cxx/parser/built-in/makefile b/xsd/tests/cxx/parser/built-in/makefile index 3164219..64987d0 100644 --- a/xsd/tests/cxx/parser/built-in/makefile +++ b/xsd/tests/cxx/parser/built-in/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/built-in/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make @@ -25,7 +24,7 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) @@ -34,7 +33,7 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -71,7 +70,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/enumeration/driver.cxx b/xsd/tests/cxx/parser/enumeration/driver.cxx index fdb0134..acd95a0 100644 --- a/xsd/tests/cxx/parser/enumeration/driver.cxx +++ b/xsd/tests/cxx/parser/enumeration/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/enumeration/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test xsd:enumeration parsing. diff --git a/xsd/tests/cxx/parser/enumeration/gender.hxx b/xsd/tests/cxx/parser/enumeration/gender.hxx index 8e5dbfd..7540888 100644 --- a/xsd/tests/cxx/parser/enumeration/gender.hxx +++ b/xsd/tests/cxx/parser/enumeration/gender.hxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/enumeration/gender.hxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef GENDER_HXX diff --git a/xsd/tests/cxx/parser/enumeration/makefile b/xsd/tests/cxx/parser/enumeration/makefile index 5776cbe..e991260 100644 --- a/xsd/tests/cxx/parser/enumeration/makefile +++ b/xsd/tests/cxx/parser/enumeration/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/enumeration/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make @@ -25,17 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --type-map $(src_base)/test.map +$(gen): xsd_options += --type-map $(src_base)/test.map $(gen): $(out_root)/xsd/xsd $(src_base)/test.map -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -72,7 +71,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/generated-impl/makefile b/xsd/tests/cxx/parser/generated-impl/makefile index 3733590..251fd41 100644 --- a/xsd/tests/cxx/parser/generated-impl/makefile +++ b/xsd/tests/cxx/parser/generated-impl/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/generated-impl/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make @@ -24,7 +23,7 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) \ @@ -38,11 +37,11 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-print-impl --generate-test-driver \ +$(gen): xsd_options += --generate-print-impl --generate-test-driver \ --force-overwrite $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -82,7 +81,12 @@ $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) xsd_parser_impl_suffix := -pimpl + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/list/driver.cxx b/xsd/tests/cxx/parser/list/driver.cxx index d4ac4e2..0a4071a 100644 --- a/xsd/tests/cxx/parser/list/driver.cxx +++ b/xsd/tests/cxx/parser/list/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/list/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test xsd:list parsing. diff --git a/xsd/tests/cxx/parser/list/makefile b/xsd/tests/cxx/parser/list/makefile index deacdb9..9fc63fd 100644 --- a/xsd/tests/cxx/parser/list/makefile +++ b/xsd/tests/cxx/parser/list/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/list/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make @@ -25,7 +24,7 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) @@ -34,7 +33,7 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -71,7 +70,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/makefile b/xsd/tests/cxx/parser/makefile index 935345b..8031478 100644 --- a/xsd/tests/cxx/parser/makefile +++ b/xsd/tests/cxx/parser/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../build/bootstrap.make diff --git a/xsd/tests/cxx/parser/name-clash/inheritance/driver.cxx b/xsd/tests/cxx/parser/name-clash/inheritance/driver.cxx index 81adb7f..af70f88 100644 --- a/xsd/tests/cxx/parser/name-clash/inheritance/driver.cxx +++ b/xsd/tests/cxx/parser/name-clash/inheritance/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/name-clash/inheritance/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test for name clashes across inheritance hierarchy. diff --git a/xsd/tests/cxx/parser/name-clash/inheritance/makefile b/xsd/tests/cxx/parser/name-clash/inheritance/makefile index 359b7e4..273c03c 100644 --- a/xsd/tests/cxx/parser/name-clash/inheritance/makefile +++ b/xsd/tests/cxx/parser/name-clash/inheritance/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/name-clash/inheritance/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -25,17 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -72,7 +71,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/polymorphism/makefile b/xsd/tests/cxx/parser/polymorphism/makefile index 42ac5c3..bb1ebeb 100644 --- a/xsd/tests/cxx/parser/polymorphism/makefile +++ b/xsd/tests/cxx/parser/polymorphism/makefile @@ -1,11 +1,10 @@ # file : tests/cxx/parser/polymorphism/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make -tests := same-type +tests := same-type recursive default := $(out_base)/ test := $(out_base)/.test diff --git a/xsd/tests/cxx/parser/polymorphism/recursive/driver.cxx b/xsd/tests/cxx/parser/polymorphism/recursive/driver.cxx new file mode 100644 index 0000000..2ad96cd --- /dev/null +++ b/xsd/tests/cxx/parser/polymorphism/recursive/driver.cxx @@ -0,0 +1,69 @@ +// file : tests/cxx/parser/polymorphism/recursive/driver.cxx +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +// Test polymorphic recursive parsing. +// + +#include <string> +#include <iostream> + +#include "test-pskel.hxx" +#include "test-pimpl.hxx" + +using namespace std; +using namespace test; + +int +main (int argc, char* argv[]) +{ + if (argc != 2) + { + cerr << "usage: " << argv[0] << " test.xml" << endl; + return 1; + } + + try + { + xml_schema::int_pimpl int_p; + + root_pimpl root_p; + expression_pimpl expression_p; + recursive_pimpl recursive_p; + value_a_pimpl value_a_p; + value_b_pimpl value_b_p; + + xml_schema::parser_map_impl expression_map; + + // Connect the parsers together. + // + root_p.parsers (expression_p); + expression_map.insert(value_a_p); + expression_map.insert(value_b_p); + expression_map.insert(recursive_p); + + root_p.expression_parser(expression_map); + + recursive_p.parsers(expression_p); + recursive_p.expression_parser(expression_map); + + value_a_p.parsers(int_p); + value_b_p.parsers(int_p); + + xml_schema::document doc_p (root_p, "test", "root", true); + + root_p.pre (); + doc_p.parse (argv[1]); + root_p.post_root (); + } + catch (xml_schema::exception const& e) + { + cerr << e << endl; + return 1; + } + catch (std::ios_base::failure const&) + { + cerr << "io failure" << endl; + return 1; + } +} diff --git a/xsd/tests/cxx/parser/polymorphism/recursive/makefile b/xsd/tests/cxx/parser/polymorphism/recursive/makefile new file mode 100644 index 0000000..50e4f3d --- /dev/null +++ b/xsd/tests/cxx/parser/polymorphism/recursive/makefile @@ -0,0 +1,84 @@ +# file : tests/cxx/parser/polymorphism/recursive/makefile +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make + +xsd := test.xsd +cxx := driver.cxx test-pimpl.cxx + +obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(xsd:.xsd=-pskel.o)) +dep := $(obj:.o=.o.d) + +driver := $(out_base)/driver +test := $(out_base)/.test +clean := $(out_base)/.clean + +# Import. +# +$(call import,\ + $(scf_root)/import/libxerces-c/stub.make,\ + l: xerces_c.l,cpp-options: xerces_c.l.cpp-options) + +# Build. +# +$(driver): $(obj) $(xerces_c.l) + +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd +$(obj) $(dep): $(xerces_c.l.cpp-options) + +genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) +gen := $(addprefix $(out_base)/,$(genf)) + +$(gen): xsd := $(out_root)/xsd/xsd +$(gen): xsd_options += --generate-polymorphic +$(gen): $(out_root)/xsd/xsd + +$(call include-dep,$(dep),$(obj),$(gen)) + +# Convenience alias for default target. +# +$(out_base)/: $(driver) + + +# Test. +# +$(test): driver := $(driver) +$(test): $(driver) $(src_base)/test.xml $(src_base)/output + $(call message,test $$1,$$1 $(src_base)/test.xml | diff -u $(src_base)/output -,$(driver)) + +# Clean. +# +$(clean): $(driver).o.clean \ + $(addsuffix .cxx.clean,$(obj)) \ + $(addsuffix .cxx.clean,$(dep)) \ + $(addprefix $(out_base)/,$(xsd:.xsd=-pskel.cxx.xsd.clean)) + +# Generated .gitignore. +# +ifeq ($(out_base),$(src_base)) +$(gen): | $(out_base)/.gitignore +$(driver): | $(out_base)/.gitignore + +$(out_base)/.gitignore: files := driver $(genf) +$(clean): $(out_base)/.gitignore.clean + +$(call include,$(bld_root)/git/gitignore.make) +endif + +# How to. +# +$(call include,$(bld_root)/cxx/o-e.make) +$(call include,$(bld_root)/cxx/cxx-o.make) +$(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) +$(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif + + +# Dependencies. +# +$(call import,$(src_root)/xsd/makefile) diff --git a/xsd/tests/cxx/parser/polymorphism/recursive/output b/xsd/tests/cxx/parser/polymorphism/recursive/output new file mode 100644 index 0000000..28a835f --- /dev/null +++ b/xsd/tests/cxx/parser/polymorphism/recursive/output @@ -0,0 +1,22 @@ +root start +recursive start +value_a begin +value->constant +value: post_expression override +value_a: post_value override +value_a end +recursive->expression event +recursive start +value_b begin +value->constant +value: post_expression override +value_b: post_value override +value_b end +recursive->expression event +recursive: post_expression override +recursive end +recursive->expression event +recursive: post_expression override +recursive end +root->expression +root end diff --git a/xsd/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx b/xsd/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx new file mode 100644 index 0000000..fe32626 --- /dev/null +++ b/xsd/tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx @@ -0,0 +1,148 @@ +// file : tests/cxx/parser/polymorphism/recursive/test-pimpl.cxx +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#include <iostream> + +#include "test-pimpl.hxx" + +using namespace std; + +namespace test +{ + // root_pimpl + // + + void root_pimpl:: + pre () + { + cout << "root start" << endl; + } + + void root_pimpl:: + expression () + { + cout << "root->expression" << endl; + } + + void root_pimpl:: + post_root () + { + cout << "root end" << endl; + } + + // expression_pimpl + // + + void expression_pimpl:: + pre () + { + cout << "expression begin" << endl; + } + + void expression_pimpl:: + post_expression () + { + cout << "expression end" << endl; + } + + // recursive_pimpl + // + + void recursive_pimpl:: + pre () + { + cout << "recursive start" << endl; + } + + void recursive_pimpl:: + expression () + { + cout << "recursive->expression event" << endl; + } + + void recursive_pimpl:: + post_expression () + { + cout << "recursive: post_expression override" << endl; + post_recursive (); + } + + void recursive_pimpl:: + post_recursive () + { + cout << "recursive end" << endl; + } + + // value_pimpl + // + + void value_pimpl:: + pre () + { + cout << "value begin" << endl; + } + + void value_pimpl:: + constant (int) + { + cout << "value->constant" << endl; + } + + void value_pimpl:: + post_expression () + { + cout << "value: post_expression override" << endl; + post_value (); + } + + void value_pimpl:: + post_value () + { + cout << "value end" << endl; + } + + // value_a_pimpl + // + + void value_a_pimpl:: + pre () + { + cout << "value_a begin" << endl; + } + + void value_a_pimpl:: + post_value () + { + cout << "value_a: post_value override" << endl; + post_value_a (); + } + + void value_a_pimpl:: + post_value_a () + { + cout << "value_a end" << endl; + } + + // value_b_pimpl + // + + void value_b_pimpl:: + pre () + { + cout << "value_b begin" << endl; + } + + void value_b_pimpl:: + post_value () + { + cout << "value_b: post_value override" << endl; + post_value_b (); + } + + void value_b_pimpl:: + post_value_b () + { + cout << "value_b end" << endl; + } +} diff --git a/xsd/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx b/xsd/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx new file mode 100644 index 0000000..f345720 --- /dev/null +++ b/xsd/tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx @@ -0,0 +1,95 @@ +// file : tests/cxx/parser/polymorphism/recursive/test-pimpl.hxx +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef TEST_PIMPL_HXX +#define TEST_PIMPL_HXX + +#include "test-pskel.hxx" + +namespace test +{ + class root_pimpl: public virtual root_pskel + { + public: + virtual void + pre (); + + virtual void + expression (); + + virtual void + post_root (); + }; + + class expression_pimpl: public virtual expression_pskel + { + public: + virtual void + pre (); + + virtual void + post_expression (); + }; + + class recursive_pimpl: public virtual recursive_pskel, + public expression_pimpl + { + public: + virtual void + pre (); + + virtual void + expression (); + + virtual void + post_expression (); + + virtual void + post_recursive (); + }; + + class value_pimpl: public virtual value_pskel, public expression_pimpl + { + public: + virtual void + pre (); + + virtual void + constant (int); + + virtual void + post_expression (); + + virtual void + post_value (); + }; + + class value_a_pimpl: public virtual value_a_pskel, public value_pimpl + { + public: + virtual void + pre (); + + virtual void + post_value (); + + virtual void + post_value_a (); + }; + + class value_b_pimpl: public virtual value_b_pskel, public value_pimpl + { + public: + virtual void + pre (); + + virtual void + post_value (); + + virtual void + post_value_b (); + }; +} + +#endif // TEST_PIMPL_HXX diff --git a/xsd/tests/cxx/parser/polymorphism/recursive/test.xml b/xsd/tests/cxx/parser/polymorphism/recursive/test.xml new file mode 100644 index 0000000..42035ba --- /dev/null +++ b/xsd/tests/cxx/parser/polymorphism/recursive/test.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<root xmlns="test" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="test test.xsd"> + <recursive> + <value-a> + <constant>1</constant> + </value-a> + <recursive> + <value-b> + <constant>2</constant> + </value-b> + </recursive> + </recursive> +</root> diff --git a/xsd/tests/cxx/parser/polymorphism/recursive/test.xsd b/xsd/tests/cxx/parser/polymorphism/recursive/test.xsd new file mode 100644 index 0000000..affcc8a --- /dev/null +++ b/xsd/tests/cxx/parser/polymorphism/recursive/test.xsd @@ -0,0 +1,53 @@ +<?xml version="1.0"?> +<schema xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:t="test" + targetNamespace="test" + elementFormDefault="qualified"> + + <element name="root" type="t:root"/> + <complexType name="root"> + <sequence> + <element ref="t:expression" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + </complexType> + + <element name="expression" type="t:expression" abstract="true"/> + <complexType name="expression" abstract="true"/> + + <element name="recursive" type="t:recursive" substitutionGroup="t:expression"/> + <complexType name="recursive"> + <complexContent> + <extension base="t:expression"> + <sequence minOccurs="0" maxOccurs="unbounded"> + <element ref="t:expression"/> + </sequence> + </extension> + </complexContent> + </complexType> + + <element name="value" type="t:value" abstract="true" substitutionGroup="t:expression"/> + <complexType name="value" abstract="true"> + <complexContent> + <extension base="t:expression"> + <sequence> + <element name="constant" type="int"/> + </sequence> + </extension> + </complexContent> + </complexType> + + <element name="value-a" type="t:value-a" substitutionGroup="t:expression"/> + <complexType name="value-a"> + <complexContent> + <extension base="t:value"/> + </complexContent> + </complexType> + + <element name="value-b" type="t:value-b" substitutionGroup="t:expression"/> + <complexType name="value-b"> + <complexContent> + <extension base="t:value"/> + </complexContent> + </complexType> + +</schema> diff --git a/xsd/tests/cxx/parser/polymorphism/same-type/driver.cxx b/xsd/tests/cxx/parser/polymorphism/same-type/driver.cxx index ea50776..05abc3c 100644 --- a/xsd/tests/cxx/parser/polymorphism/same-type/driver.cxx +++ b/xsd/tests/cxx/parser/polymorphism/same-type/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/polymorphism/same-type/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test substitution group and xsi:type that don't change the type. @@ -45,7 +44,7 @@ main (int argc, char* argv[]) base_p.parsers (string_p); type_p.parsers (base_p); - xml_schema::document doc_p (type_p, "test", "root"); + xml_schema::document doc_p (type_p, "test", "root", true); type_p.pre (); doc_p.parse (argv[1]); diff --git a/xsd/tests/cxx/parser/polymorphism/same-type/makefile b/xsd/tests/cxx/parser/polymorphism/same-type/makefile index c357597..256b34d 100644 --- a/xsd/tests/cxx/parser/polymorphism/same-type/makefile +++ b/xsd/tests/cxx/parser/polymorphism/same-type/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/polymorphism/same-type/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -25,17 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-polymorphic +$(gen): xsd_options += --generate-polymorphic $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -72,7 +71,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/recursive/driver.cxx b/xsd/tests/cxx/parser/recursive/driver.cxx index 3f54f8f..41f21e7 100644 --- a/xsd/tests/cxx/parser/recursive/driver.cxx +++ b/xsd/tests/cxx/parser/recursive/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/recursive/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test recursive parser invocation. diff --git a/xsd/tests/cxx/parser/recursive/makefile b/xsd/tests/cxx/parser/recursive/makefile index bd78bef..8ccf0bc 100644 --- a/xsd/tests/cxx/parser/recursive/makefile +++ b/xsd/tests/cxx/parser/recursive/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/recursive/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make @@ -25,17 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -72,7 +71,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/test-template/driver.cxx b/xsd/tests/cxx/parser/test-template/driver.cxx index b3379ff..01ef390 100644 --- a/xsd/tests/cxx/parser/test-template/driver.cxx +++ b/xsd/tests/cxx/parser/test-template/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/test-template/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Insert test description here. diff --git a/xsd/tests/cxx/parser/test-template/makefile b/xsd/tests/cxx/parser/test-template/makefile index 5f5f9bc..dd1e19f 100644 --- a/xsd/tests/cxx/parser/test-template/makefile +++ b/xsd/tests/cxx/parser/test-template/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/test-template/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make @@ -25,7 +24,7 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) @@ -34,7 +33,7 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -71,7 +70,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/union/driver.cxx b/xsd/tests/cxx/parser/union/driver.cxx index 4a67f2f..5a576ba 100644 --- a/xsd/tests/cxx/parser/union/driver.cxx +++ b/xsd/tests/cxx/parser/union/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/union/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test xsd:union parsing. diff --git a/xsd/tests/cxx/parser/union/makefile b/xsd/tests/cxx/parser/union/makefile index fa2b844..7de92ad 100644 --- a/xsd/tests/cxx/parser/union/makefile +++ b/xsd/tests/cxx/parser/union/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/union/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make @@ -25,7 +24,7 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) @@ -34,7 +33,7 @@ gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # @@ -71,7 +70,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/validation/all/driver.cxx b/xsd/tests/cxx/parser/validation/all/driver.cxx index d4a3839..71a21a0 100644 --- a/xsd/tests/cxx/parser/validation/all/driver.cxx +++ b/xsd/tests/cxx/parser/validation/all/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/all/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the all compositor validation. diff --git a/xsd/tests/cxx/parser/validation/all/makefile b/xsd/tests/cxx/parser/validation/all/makefile index 6336fdc..acc0a79 100644 --- a/xsd/tests/cxx/parser/validation/all/makefile +++ b/xsd/tests/cxx/parser/validation/all/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/all/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -27,17 +26,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. @@ -81,7 +80,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/validation/any/driver.cxx b/xsd/tests/cxx/parser/validation/any/driver.cxx index e858285..f7773b4 100644 --- a/xsd/tests/cxx/parser/validation/any/driver.cxx +++ b/xsd/tests/cxx/parser/validation/any/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/any/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the any particle validation. diff --git a/xsd/tests/cxx/parser/validation/any/makefile b/xsd/tests/cxx/parser/validation/any/makefile index 084a131..ae6735d 100644 --- a/xsd/tests/cxx/parser/validation/any/makefile +++ b/xsd/tests/cxx/parser/validation/any/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/any/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -27,17 +26,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. @@ -81,7 +80,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/validation/attribute/driver.cxx b/xsd/tests/cxx/parser/validation/attribute/driver.cxx index e726ad8..7e4de25 100644 --- a/xsd/tests/cxx/parser/validation/attribute/driver.cxx +++ b/xsd/tests/cxx/parser/validation/attribute/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/attribute/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test attribute and attribute wildcard (anyAttribute) validation. diff --git a/xsd/tests/cxx/parser/validation/attribute/makefile b/xsd/tests/cxx/parser/validation/attribute/makefile index 0f7df21..94e5369 100644 --- a/xsd/tests/cxx/parser/validation/attribute/makefile +++ b/xsd/tests/cxx/parser/validation/attribute/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/attribute/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -27,17 +26,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. @@ -81,7 +80,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/validation/built-in/any-type/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/any-type/driver.cxx index 46ccc96..4b03218 100644 --- a/xsd/tests/cxx/parser/validation/built-in/any-type/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/any-type/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/any-type/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the anyType and anySimpleType validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/any-type/makefile b/xsd/tests/cxx/parser/validation/built-in/any-type/makefile index bf42aac..7ae3a96 100644 --- a/xsd/tests/cxx/parser/validation/built-in/any-type/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/any-type/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/any-type/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -27,17 +26,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. @@ -81,7 +80,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/validation/built-in/binary/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/binary/driver.cxx index e75d55f..96f6d4e 100644 --- a/xsd/tests/cxx/parser/validation/built-in/binary/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/binary/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/binary/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in base64Binary and hexBinary types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/binary/makefile b/xsd/tests/cxx/parser/validation/built-in/binary/makefile index b729cd0..fe48886 100644 --- a/xsd/tests/cxx/parser/validation/built-in/binary/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/binary/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/binary/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/boolean/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/boolean/driver.cxx index 85586a6..6ebe23c 100644 --- a/xsd/tests/cxx/parser/validation/built-in/boolean/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/boolean/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/boolean/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in boolean type validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/boolean/makefile b/xsd/tests/cxx/parser/validation/built-in/boolean/makefile index 39ca5e9..f5812a5 100644 --- a/xsd/tests/cxx/parser/validation/built-in/boolean/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/boolean/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/boolean/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/byte/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/byte/driver.cxx index 466f004..48d91df 100644 --- a/xsd/tests/cxx/parser/validation/built-in/byte/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/byte/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/byte/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in byte and unsigned byte types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/byte/makefile b/xsd/tests/cxx/parser/validation/built-in/byte/makefile index 32f4b91..cdaabfc 100644 --- a/xsd/tests/cxx/parser/validation/built-in/byte/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/byte/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/byte/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/date-time/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/date-time/driver.cxx index 6297912..015205a 100644 --- a/xsd/tests/cxx/parser/validation/built-in/date-time/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/date-time/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/date-time/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in date and time types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/date-time/makefile b/xsd/tests/cxx/parser/validation/built-in/date-time/makefile index d5e2edc..ee16e1f 100644 --- a/xsd/tests/cxx/parser/validation/built-in/date-time/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/date-time/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/date-time/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/float/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/float/driver.cxx index 1f6f0bd..f984498 100644 --- a/xsd/tests/cxx/parser/validation/built-in/float/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/float/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/float/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in float, double, and decimal types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/float/makefile b/xsd/tests/cxx/parser/validation/built-in/float/makefile index 8755f3a..6755693 100644 --- a/xsd/tests/cxx/parser/validation/built-in/float/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/float/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/float/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/int/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/int/driver.cxx index 00c5947..8d4392b 100644 --- a/xsd/tests/cxx/parser/validation/built-in/int/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/int/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/int/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in int and unsigned int types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/int/makefile b/xsd/tests/cxx/parser/validation/built-in/int/makefile index 4cebe64..46f0baa 100644 --- a/xsd/tests/cxx/parser/validation/built-in/int/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/int/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/int/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/integer/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/integer/driver.cxx index fa8e4e0..2828249 100644 --- a/xsd/tests/cxx/parser/validation/built-in/integer/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/integer/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/int/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in integer & friends types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/integer/makefile b/xsd/tests/cxx/parser/validation/built-in/integer/makefile index 6b9d816..ca6482f 100644 --- a/xsd/tests/cxx/parser/validation/built-in/integer/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/integer/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/integer/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/long/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/long/driver.cxx index c7a66c4..2033125 100644 --- a/xsd/tests/cxx/parser/validation/built-in/long/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/long/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/long/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in long and unsigned long types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/long/makefile b/xsd/tests/cxx/parser/validation/built-in/long/makefile index 2ab6368..b3ad382 100644 --- a/xsd/tests/cxx/parser/validation/built-in/long/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/long/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/long/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/makefile b/xsd/tests/cxx/parser/validation/built-in/makefile index 34bea8f..e300092 100644 --- a/xsd/tests/cxx/parser/validation/built-in/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make diff --git a/xsd/tests/cxx/parser/validation/built-in/qname/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/qname/driver.cxx index 3a4bc90..3c77eea 100644 --- a/xsd/tests/cxx/parser/validation/built-in/qname/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/qname/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/qname/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in QName type validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/qname/makefile b/xsd/tests/cxx/parser/validation/built-in/qname/makefile index 5f53fea..9e06bad 100644 --- a/xsd/tests/cxx/parser/validation/built-in/qname/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/qname/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/qname/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/short/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/short/driver.cxx index 2bb95d2..5ee950c 100644 --- a/xsd/tests/cxx/parser/validation/built-in/short/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/short/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/short/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in short and unsigned short types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/short/makefile b/xsd/tests/cxx/parser/validation/built-in/short/makefile index eee8382..50c2b80 100644 --- a/xsd/tests/cxx/parser/validation/built-in/short/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/short/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/short/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/string/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/string/driver.cxx index 2419d59..5948542 100644 --- a/xsd/tests/cxx/parser/validation/built-in/string/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/string/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/string/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in string & friends types validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/string/makefile b/xsd/tests/cxx/parser/validation/built-in/string/makefile index 5be3c4c..41c0dcd 100644 --- a/xsd/tests/cxx/parser/validation/built-in/string/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/string/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/string/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/built-in/uri/driver.cxx b/xsd/tests/cxx/parser/validation/built-in/uri/driver.cxx index f6de3c2..daff0c7 100644 --- a/xsd/tests/cxx/parser/validation/built-in/uri/driver.cxx +++ b/xsd/tests/cxx/parser/validation/built-in/uri/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/built-in/uri/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the built-in anyURI type validation. diff --git a/xsd/tests/cxx/parser/validation/built-in/uri/makefile b/xsd/tests/cxx/parser/validation/built-in/uri/makefile index ad53e89..cfb8101 100644 --- a/xsd/tests/cxx/parser/validation/built-in/uri/makefile +++ b/xsd/tests/cxx/parser/validation/built-in/uri/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/built-in/uri/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../../build/bootstrap.make @@ -25,10 +24,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) -$(call include-dep,$(dep)) +# Define XSD_CXX11 since we include libxsd headers directly. +# +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifeq ($(cxx_standard),c++11) +$(obj) $(dep): cpp_options += -DXSD_CXX11 +endif + +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. # diff --git a/xsd/tests/cxx/parser/validation/choice/driver.cxx b/xsd/tests/cxx/parser/validation/choice/driver.cxx index 87cd0a9..fd1e651 100644 --- a/xsd/tests/cxx/parser/validation/choice/driver.cxx +++ b/xsd/tests/cxx/parser/validation/choice/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/choice/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the choice compositor validation. diff --git a/xsd/tests/cxx/parser/validation/choice/makefile b/xsd/tests/cxx/parser/validation/choice/makefile index f113bd5..ec86590 100644 --- a/xsd/tests/cxx/parser/validation/choice/makefile +++ b/xsd/tests/cxx/parser/validation/choice/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/choice/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -27,17 +26,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. @@ -81,7 +80,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/validation/makefile b/xsd/tests/cxx/parser/validation/makefile index 5b7b884..c5d43ed 100644 --- a/xsd/tests/cxx/parser/validation/makefile +++ b/xsd/tests/cxx/parser/validation/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../build/bootstrap.make diff --git a/xsd/tests/cxx/parser/validation/restriction/driver.cxx b/xsd/tests/cxx/parser/validation/restriction/driver.cxx index 40a2bc9..ea87af6 100644 --- a/xsd/tests/cxx/parser/validation/restriction/driver.cxx +++ b/xsd/tests/cxx/parser/validation/restriction/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/restriction/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the restriction compositor validation. diff --git a/xsd/tests/cxx/parser/validation/restriction/makefile b/xsd/tests/cxx/parser/validation/restriction/makefile index 66e4d9a..5e1a9fd 100644 --- a/xsd/tests/cxx/parser/validation/restriction/makefile +++ b/xsd/tests/cxx/parser/validation/restriction/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/restriction/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -27,17 +26,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. @@ -81,7 +80,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. diff --git a/xsd/tests/cxx/parser/validation/sequence/driver.cxx b/xsd/tests/cxx/parser/validation/sequence/driver.cxx index 2e994b2..eddf744 100644 --- a/xsd/tests/cxx/parser/validation/sequence/driver.cxx +++ b/xsd/tests/cxx/parser/validation/sequence/driver.cxx @@ -1,6 +1,5 @@ // file : tests/cxx/parser/validation/sequence/driver.cxx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file // Test the sequence compositor validation. diff --git a/xsd/tests/cxx/parser/validation/sequence/makefile b/xsd/tests/cxx/parser/validation/sequence/makefile index 53f6c61..540f2ea 100644 --- a/xsd/tests/cxx/parser/validation/sequence/makefile +++ b/xsd/tests/cxx/parser/validation/sequence/makefile @@ -1,6 +1,5 @@ # file : tests/cxx/parser/validation/sequence/makefile -# author : Boris Kolpackov <boris@codesynthesis.com> -# copyright : Copyright (c) 2006-2010 Code Synthesis Tools CC +# copyright : Copyright (c) 2006-2014 Code Synthesis Tools CC # license : GNU GPL v2 + exceptions; see accompanying LICENSE file include $(dir $(lastword $(MAKEFILE_LIST)))../../../../../build/bootstrap.make @@ -27,17 +26,17 @@ $(call import,\ # $(driver): $(obj) $(xerces_c.l) -$(obj) $(dep): cpp_options := -I$(src_root)/libxsd +$(obj) $(dep): cpp_options := -I$(out_base) -I$(src_base) -I$(src_root)/libxsd $(obj) $(dep): $(xerces_c.l.cpp-options) genf := $(xsd:.xsd=-pskel.hxx) $(xsd:.xsd=-pskel.ixx) $(xsd:.xsd=-pskel.cxx) gen := $(addprefix $(out_base)/,$(genf)) $(gen): xsd := $(out_root)/xsd/xsd -$(gen): xsd_options := --generate-validation +$(gen): xsd_options += --generate-validation $(gen): $(out_root)/xsd/xsd -$(call include-dep,$(dep)) +$(call include-dep,$(dep),$(obj),$(gen)) # Convenience alias for default target. @@ -81,7 +80,12 @@ endif $(call include,$(bld_root)/cxx/o-e.make) $(call include,$(bld_root)/cxx/cxx-o.make) $(call include,$(bld_root)/cxx/cxx-d.make) + +$(call include,$(bld_root)/cxx/standard.make) # cxx_standard +ifdef cxx_standard +$(gen): xsd_options += --std $(cxx_standard) $(call include,$(scf_root)/xsd/parser/xsd-cxx.make) +endif # Dependencies. |