diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-12-13 21:57:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-23 21:20:44 +0300 |
commit | fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (patch) | |
tree | 6c8c1bfb5fe89f7378b92ac066b4ca8ecfd25228 /sqlite | |
parent | 02367faedb16b6186e8852de47e5b749dc48c2df (diff) |
Switch to build2
Diffstat (limited to 'sqlite')
62 files changed, 390 insertions, 2638 deletions
diff --git a/sqlite/Makefile.am b/sqlite/Makefile.am deleted file mode 100644 index 998e823..0000000 --- a/sqlite/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# file : sqlite/Makefile.am -# license : GNU GPL v2; see accompanying LICENSE file - -SUBDIRS = __path__(dirs) -EXTRA_DIST = __file__(extra_dist) diff --git a/sqlite/attach/buildfile b/sqlite/attach/buildfile new file mode 100644 index 0000000..959f050 --- /dev/null +++ b/sqlite/attach/buildfile @@ -0,0 +1,32 @@ +# file : sqlite/attach/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-sqlite%lib{odb-sqlite} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix sqlitex_attach_ \ + --generate-schema \ + --default-database common \ + --generate-query \ + --schema main + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/attach/driver.cxx b/sqlite/attach/driver.cxx index 8d0672f..25d279f 100644 --- a/sqlite/attach/driver.cxx +++ b/sqlite/attach/driver.cxx @@ -4,8 +4,7 @@ // Test attached database support. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/schema-catalog.hxx> @@ -14,11 +13,14 @@ #include <odb/sqlite/connection.hxx> #include <odb/sqlite/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; namespace sqlite = odb::sqlite; using namespace sqlite; @@ -28,7 +30,7 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> mdb (create_specific_database<database> (argc, argv)); + unique_ptr<database> mdb (create_specific_database<database> (argc, argv)); { object o ("one"); @@ -58,7 +60,7 @@ main (int argc, char* argv[]) { transaction t (c->begin ()); - auto_ptr<object> p (adb.load<object> (o.id)); + unique_ptr<object> p (adb.load<object> (o.id)); t.commit (); assert (p->str == o.str); @@ -76,7 +78,7 @@ main (int argc, char* argv[]) typedef sqlite::query<object> query; transaction t (c->begin ()); - auto_ptr<object> p (adb.query_one<object> (query::str == "two")); + unique_ptr<object> p (adb.query_one<object> (query::str == "two")); t.commit (); assert (p->str == o.str); @@ -90,7 +92,7 @@ main (int argc, char* argv[]) { transaction t (c->begin ()); - auto_ptr<object> p (mdb->load<object> (o.id)); + unique_ptr<object> p (mdb->load<object> (o.id)); t.commit (); assert (p.get () != 0); diff --git a/sqlite/attach/makefile b/sqlite/attach/makefile deleted file mode 100644 index 1ae325d..0000000 --- a/sqlite/attach/makefile +++ /dev/null @@ -1,108 +0,0 @@ -# file : sqlite/attach/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database sqlite --default-database \ -common --generate-query --generate-schema --table-prefix sqlitex_attach_ \ ---schema main -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(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)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/attach/test.std b/sqlite/attach/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/attach/test.std +++ /dev/null diff --git a/sqlite/attach/testscript b/sqlite/attach/testscript new file mode 100644 index 0000000..db5089d --- /dev/null +++ b/sqlite/attach/testscript @@ -0,0 +1,9 @@ +# file : sqlite/attach/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../sqlite.testscript + +: basics +: +$* diff --git a/sqlite/auto/buildfile b/sqlite/auto/buildfile new file mode 100644 index 0000000..2c70b7c --- /dev/null +++ b/sqlite/auto/buildfile @@ -0,0 +1,32 @@ +# file : sqlite/auto/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-sqlite%lib{odb-sqlite} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix sqlitex_auto_ \ + --generate-schema \ + --default-database common \ + --generate-query \ + --sqlite-lax-auto-id + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/auto/driver.cxx b/sqlite/auto/driver.cxx index 4ac29b3..bcd42c1 100644 --- a/sqlite/auto/driver.cxx +++ b/sqlite/auto/driver.cxx @@ -4,18 +4,20 @@ // Test manual/automatic id assignment. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/sqlite/database.hxx> #include <odb/sqlite/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; namespace sqlite = odb::sqlite; using namespace sqlite; @@ -25,7 +27,7 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); // object // @@ -55,9 +57,9 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object> o1 (db->load<object> (id1)); - auto_ptr<object> o2 (db->load<object> (id2)); - auto_ptr<object> o3 (db->load<object> (id3)); + unique_ptr<object> o1 (db->load<object> (id1)); + unique_ptr<object> o2 (db->load<object> (id2)); + unique_ptr<object> o3 (db->load<object> (id3)); t.commit (); assert (*o1->id_ == id1 && o1->str_ == "one"); diff --git a/sqlite/auto/makefile b/sqlite/auto/makefile deleted file mode 100644 index 6da7071..0000000 --- a/sqlite/auto/makefile +++ /dev/null @@ -1,108 +0,0 @@ -# file : sqlite/auto/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database sqlite --default-database \ -common --generate-query --generate-schema --table-prefix sqlitex_auto_ \ ---sqlite-lax-auto-id -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(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)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/auto/test.std b/sqlite/auto/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/auto/test.std +++ /dev/null diff --git a/sqlite/auto/testscript b/sqlite/auto/testscript new file mode 100644 index 0000000..a5a7da5 --- /dev/null +++ b/sqlite/auto/testscript @@ -0,0 +1,9 @@ +# file : sqlite/auto/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../sqlite.testscript + +: basics +: +$* diff --git a/sqlite/custom/buildfile b/sqlite/custom/buildfile new file mode 100644 index 0000000..3325762 --- /dev/null +++ b/sqlite/custom/buildfile @@ -0,0 +1,31 @@ +# file : sqlite/custom/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-sqlite%lib{odb-sqlite} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix sqlitex_custom_ \ + --generate-schema \ + --default-database common \ + --generate-query + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/custom/driver.cxx b/sqlite/custom/driver.cxx index b53c0f6..0627708 100644 --- a/sqlite/custom/driver.cxx +++ b/sqlite/custom/driver.cxx @@ -4,18 +4,20 @@ // Test custom database type mapping in SQLite. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/sqlite/database.hxx> #include <odb/sqlite/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; namespace sqlite = odb::sqlite; using namespace sqlite; @@ -25,7 +27,7 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); object o (1); o.nv.push_back ("123"); // INTEGER @@ -44,7 +46,7 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr<object> o1 (db->load<object> (1)); + unique_ptr<object> o1 (db->load<object> (1)); t.commit (); assert (o == *o1); @@ -62,7 +64,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object> o1 (db->load<object> (1)); + unique_ptr<object> o1 (db->load<object> (1)); t.commit (); assert (o == *o1); diff --git a/sqlite/custom/makefile b/sqlite/custom/makefile deleted file mode 100644 index 39f1c76..0000000 --- a/sqlite/custom/makefile +++ /dev/null @@ -1,107 +0,0 @@ -# file : sqlite/custom/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database sqlite --default-database \ -common --generate-schema --generate-query --table-prefix sqlitex_custom_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(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)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/custom/test.std b/sqlite/custom/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/custom/test.std +++ /dev/null diff --git a/sqlite/custom/testscript b/sqlite/custom/testscript new file mode 100644 index 0000000..53561ae --- /dev/null +++ b/sqlite/custom/testscript @@ -0,0 +1,9 @@ +# file : sqlite/custom/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../sqlite.testscript + +: basics +: +$* diff --git a/sqlite/database/buildfile b/sqlite/database/buildfile new file mode 100644 index 0000000..e74ab1a --- /dev/null +++ b/sqlite/database/buildfile @@ -0,0 +1,11 @@ +# file : sqlite/database/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libs = libodb-sqlite%lib{odb-sqlite} + +exe{driver}: {hxx cxx}{*} $libs testscript + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/database/driver.cxx b/sqlite/database/driver.cxx index d0fe198..5e16653 100644 --- a/sqlite/database/driver.cxx +++ b/sqlite/database/driver.cxx @@ -4,10 +4,11 @@ // Test that database constructors are unambiguous and some other things. // -#include <cassert> - #include <odb/sqlite/database.hxx> +#undef NDEBUG +#include <cassert> + namespace sqlite = odb::sqlite; using namespace sqlite; diff --git a/sqlite/database/makefile b/sqlite/database/makefile deleted file mode 100644 index 4a2a5ef..0000000 --- a/sqlite/database/makefile +++ /dev/null @@ -1,83 +0,0 @@ -# file : sqlite/database/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/database/test.std b/sqlite/database/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/database/test.std +++ /dev/null diff --git a/sqlite/database/testscript b/sqlite/database/testscript new file mode 100644 index 0000000..b9c0f5f --- /dev/null +++ b/sqlite/database/testscript @@ -0,0 +1,6 @@ +# file : sqlite/database/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +: basics +: +$* diff --git a/sqlite/makefile b/sqlite/makefile deleted file mode 100644 index a80d464..0000000 --- a/sqlite/makefile +++ /dev/null @@ -1,44 +0,0 @@ -# file : sqlite/makefile -# license : GNU GPL; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make - -tests := \ -template \ -attach \ -auto \ -custom \ -database \ -native \ -stream \ -transaction \ -truncation \ -types - -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests))) - -$(dist): name := sqlite -$(dist): export dirs := $(tests) -$(dist): export extra_dist := $(name)-vc8.sln $(name)-vc9.sln \ -$(name)-vc10.sln $(name)-vc11.sln $(name)-vc12.sln test.bat -$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(tests))) - $(call meta-automake) - $(call meta-vc8sln1,$(name)) - $(call meta-vc9sln1,$(name)) - $(call meta-vc10sln1,$(name)) - $(call meta-vc11sln1,$(name)) - $(call meta-vc12sln1,$(name)) - $(call meta-vctest,$(name)-vc10.sln,test.bat) - -$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests))) - -$(call include,$(bld_root)/meta/vc8sln.make) -$(call include,$(bld_root)/meta/vc9sln.make) -$(call include,$(bld_root)/meta/vc10sln.make) -$(call include,$(bld_root)/meta/vc11sln.make) -$(call include,$(bld_root)/meta/vc12sln.make) -$(call include,$(bld_root)/meta/vctest.make) -$(call include,$(bld_root)/meta/automake.make) - -$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile)) diff --git a/sqlite/native/buildfile b/sqlite/native/buildfile new file mode 100644 index 0000000..49aa05b --- /dev/null +++ b/sqlite/native/buildfile @@ -0,0 +1,12 @@ +# file : sqlite/native/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libs = libodb-sqlite%lib{odb-sqlite} +import libs += lib{common} + +exe{driver}: {hxx cxx}{*} $libs testscript + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/native/driver.cxx b/sqlite/native/driver.cxx index 10a6b05..c87aa5d 100644 --- a/sqlite/native/driver.cxx +++ b/sqlite/native/driver.cxx @@ -4,14 +4,16 @@ // Test native SQL execution. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/sqlite/database.hxx> #include <odb/sqlite/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> + +#undef NDEBUG +#include <cassert> using namespace std; namespace sqlite = odb::sqlite; @@ -22,7 +24,7 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> db ( + unique_ptr<database> db ( create_specific_database<database> (argc, argv, false)); // Create the database schema. diff --git a/sqlite/native/makefile b/sqlite/native/makefile deleted file mode 100644 index c5434f0..0000000 --- a/sqlite/native/makefile +++ /dev/null @@ -1,83 +0,0 @@ -# file : sqlite/native/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/native/test.std b/sqlite/native/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/native/test.std +++ /dev/null diff --git a/sqlite/native/testscript b/sqlite/native/testscript new file mode 100644 index 0000000..16f05e0 --- /dev/null +++ b/sqlite/native/testscript @@ -0,0 +1,9 @@ +# file : sqlite/native/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../sqlite.testscript + +: basics +: +$* diff --git a/sqlite/stream/buildfile b/sqlite/stream/buildfile new file mode 100644 index 0000000..fb8f605 --- /dev/null +++ b/sqlite/stream/buildfile @@ -0,0 +1,31 @@ +# file : sqlite/stream/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} +import libodb_sqlite = libodb-sqlite%lib{odb-sqlite} +import libs = lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb and +# libodb-sqlite libraries are resolved for the odb_compile ad hoc rule (see +# build/root.build for details). +# +libue{test-meta}: $libodb $libodb_sqlite + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix sqlitex_stream_ \ + --generate-schema \ + --default-database common \ + --generate-query + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/stream/driver.cxx b/sqlite/stream/driver.cxx index 7049b8b..86522ec 100644 --- a/sqlite/stream/driver.cxx +++ b/sqlite/stream/driver.cxx @@ -5,8 +5,7 @@ // #include <vector> -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/sqlite/database.hxx> @@ -15,11 +14,14 @@ #include <odb/sqlite/text-stream.hxx> #include <odb/sqlite/blob-stream.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; namespace sqlite = odb::sqlite; using namespace sqlite; @@ -41,7 +43,7 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); string txt (1024 * 1024, 't'); vector<char> blb (1024 * 1024, 'b'); @@ -80,7 +82,7 @@ main (int argc, char* argv[]) { transaction tx (db->begin ()); - auto_ptr<object> p (db->load<object> (o.id)); + unique_ptr<object> p (db->load<object> (o.id)); print (p->t); print (p->b); @@ -169,7 +171,7 @@ main (int argc, char* argv[]) { transaction tx (db->begin ()); - auto_ptr<object> p (db->load<object> (o.id)); + unique_ptr<object> p (db->load<object> (o.id)); print (p->t); print (p->b); diff --git a/sqlite/stream/makefile b/sqlite/stream/makefile deleted file mode 100644 index 1a46b62..0000000 --- a/sqlite/stream/makefile +++ /dev/null @@ -1,107 +0,0 @@ -# file : sqlite/stream/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database sqlite --default-database \ -common --generate-query --generate-schema --table-prefix sqlitex_stream_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(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)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/stream/test.std b/sqlite/stream/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/stream/test.std +++ /dev/null diff --git a/sqlite/stream/testscript b/sqlite/stream/testscript new file mode 100644 index 0000000..2b9f019 --- /dev/null +++ b/sqlite/stream/testscript @@ -0,0 +1,9 @@ +# file : sqlite/stream/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../sqlite.testscript + +: basics +: +$* diff --git a/sqlite/template/Makefile.am b/sqlite/template/Makefile.am deleted file mode 100644 index b922bf1..0000000 --- a/sqlite/template/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# file : sqlite/template/Makefile.am -# license : GNU GPL v2; see accompanying LICENSE file - -EXTRA_DIST = __file__(extra_dist) - -noinst_PROGRAMS = driver -driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) -LDADD = $(top_builddir)/libcommon/common/libcommon.la -AM_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' -AM_CPPFLAGS += -I'$(builddir)' -I'$(srcdir)' - -TESTS=$(top_builddir)/tester -TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir; - -__ifelse__(__value__(odb_options),,, - -# ODB compilation. -# -driver_SOURCES += test.hxx -nodist_driver_SOURCES = test-odb.cxx -BUILT_SOURCES = test-odb.hxx -CLEANFILES = test-odb.hxx test-odb.ixx test-odb.cxx - -ODB = @ODB@ -ODBFLAGS = @ODBFLAGS@ -ODBCPPFLAGS = @ODBCPPFLAGS@ - -if HAVE_CXX11 -ODBFLAGS += --std c++11 -endif - -test-odb.hxx: test.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< -) diff --git a/sqlite/template/driver.cxx b/sqlite/template/driver.cxx deleted file mode 100644 index 95fdfb0..0000000 --- a/sqlite/template/driver.cxx +++ /dev/null @@ -1,40 +0,0 @@ -// file : sqlite/template/driver.cxx -// license : GNU GPL v2; see accompanying LICENSE file - -// PLACE TEST DESCRIPTION HERE -// - -#include <memory> // std::auto_ptr -#include <cassert> -#include <iostream> - -#include <odb/sqlite/database.hxx> -#include <odb/sqlite/transaction.hxx> - -#include <common/common.hxx> - -#include "test.hxx" -#include "test-odb.hxx" - -using namespace std; -namespace sqlite = odb::sqlite; -using namespace sqlite; - -int -main (int argc, char* argv[]) -{ - try - { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); - - { - transaction t (db->begin ()); - t.commit (); - } - } - catch (const odb::exception& e) - { - cerr << e.what () << endl; - return 1; - } -} diff --git a/sqlite/template/makefile b/sqlite/template/makefile deleted file mode 100644 index 45ba099..0000000 --- a/sqlite/template/makefile +++ /dev/null @@ -1,108 +0,0 @@ -# file : sqlite/template/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database sqlite --default-database \ -common --generate-schema --table-prefix sqlitex_template_ #@@ CHANGE THIS -# Note: 'x' here is not a typo. -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(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)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/template/template-vc10.vcxproj b/sqlite/template/template-vc10.vcxproj deleted file mode 100644 index 8e11aa6..0000000 --- a/sqlite/template/template-vc10.vcxproj +++ /dev/null @@ -1,180 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{__uuid__()}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>__value__(name)</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common-d.lib;odb-sqlite-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-sqlite-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common.lib;odb-sqlite.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common.lib;odb-sqlite.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> -__ifelse__(__value__(odb_options),,, -m4_dnl - <ItemGroup> -__custom_build_entry__( -test.hxx, -odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) - </ItemGroup>) - <ItemGroup> -__ifelse__(__value__(odb_options),,, -__header_entry__(test-odb.hxx) -__header_entry__(test-odb.ixx)) -__header_entries__(extra_headers) - </ItemGroup> - <ItemGroup> -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> diff --git a/sqlite/template/template-vc10.vcxproj.filters b/sqlite/template/template-vc10.vcxproj.filters deleted file mode 100644 index 8ac18a3..0000000 --- a/sqlite/template/template-vc10.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> - <Extensions>cxx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> - <Extensions>h;hxx;ixx;txx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> -__ifelse__(__value__(odb_options),,, -__header_filter_entry__(test.hxx) -__header_filter_entry__(test-odb.hxx) -__header_filter_entry__(test-odb.ixx)) -__header_filter_entries__(extra_headers) - </ItemGroup> - <ItemGroup> -__source_filter_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) -__source_filter_entries__(extra_sources) - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/sqlite/template/template-vc11.vcxproj b/sqlite/template/template-vc11.vcxproj deleted file mode 100644 index 54fc9ef..0000000 --- a/sqlite/template/template-vc11.vcxproj +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{__uuid__()}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>__value__(name)</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v110</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v110</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v110</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v110</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common-d.lib;odb-sqlite-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-sqlite-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common.lib;odb-sqlite.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common.lib;odb-sqlite.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> -__ifelse__(__value__(odb_options),,, -m4_dnl - <ItemGroup> -__custom_build_entry__( -test.hxx, -odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) - </ItemGroup>) - <ItemGroup> -__ifelse__(__value__(odb_options),,, -__header_entry__(test-odb.hxx) -__header_entry__(test-odb.ixx)) -__header_entries__(extra_headers) - </ItemGroup> - <ItemGroup> -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> diff --git a/sqlite/template/template-vc11.vcxproj.filters b/sqlite/template/template-vc11.vcxproj.filters deleted file mode 100644 index 8ac18a3..0000000 --- a/sqlite/template/template-vc11.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> - <Extensions>cxx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> - <Extensions>h;hxx;ixx;txx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> -__ifelse__(__value__(odb_options),,, -__header_filter_entry__(test.hxx) -__header_filter_entry__(test-odb.hxx) -__header_filter_entry__(test-odb.ixx)) -__header_filter_entries__(extra_headers) - </ItemGroup> - <ItemGroup> -__source_filter_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) -__source_filter_entries__(extra_sources) - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/sqlite/template/template-vc12.vcxproj b/sqlite/template/template-vc12.vcxproj deleted file mode 100644 index 09beff2..0000000 --- a/sqlite/template/template-vc12.vcxproj +++ /dev/null @@ -1,188 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Debug|x64"> - <Configuration>Debug</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|x64"> - <Configuration>Release</Configuration> - <Platform>x64</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{__uuid__()}</ProjectGuid> - <Keyword>Win32Proj</Keyword> - <RootNamespace>__value__(name)</RootNamespace> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v120</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v120</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v120</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>Application</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <PlatformToolset>v120</PlatformToolset> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>Unicode</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <LinkIncremental>true</LinkIncremental> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> - <OutDir>$(Platform)\$(Configuration)\</OutDir> - <TargetName>driver</TargetName> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <SDLCheck>true</SDLCheck> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common-d.lib;odb-sqlite-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> - <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <WarningLevel>Level3</WarningLevel> - <Optimization>Disabled</Optimization> - <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <SDLCheck>true</SDLCheck> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-sqlite-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <SDLCheck>true</SDLCheck> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib\common.lib;odb-sqlite.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <ClCompile> - <WarningLevel>Level3</WarningLevel> - <PrecompiledHeader> - </PrecompiledHeader> - <Optimization>MaxSpeed</Optimization> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> - <PreprocessorDefinitions>WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>$(SolutionDir)\..\libcommon</AdditionalIncludeDirectories> - <DisableSpecificWarnings>4068;4355;4800;4290;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <SDLCheck>true</SDLCheck> - </ClCompile> - <Link> - <AdditionalDependencies>$(SolutionDir)\..\libcommon\lib64\common.lib;odb-sqlite.lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> - <SubSystem>Console</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> - </Link> - </ItemDefinitionGroup> -__ifelse__(__value__(odb_options),,, -m4_dnl - <ItemGroup> -__custom_build_entry__( -test.hxx, -odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) - </ItemGroup>) - <ItemGroup> -__ifelse__(__value__(odb_options),,, -__header_entry__(test-odb.hxx) -__header_entry__(test-odb.ixx)) -__header_entries__(extra_headers) - </ItemGroup> - <ItemGroup> -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> diff --git a/sqlite/template/template-vc12.vcxproj.filters b/sqlite/template/template-vc12.vcxproj.filters deleted file mode 100644 index 8ac18a3..0000000 --- a/sqlite/template/template-vc12.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> - <Extensions>cxx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> - <Extensions>h;hxx;ixx;txx</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> -__ifelse__(__value__(odb_options),,, -__header_filter_entry__(test.hxx) -__header_filter_entry__(test-odb.hxx) -__header_filter_entry__(test-odb.ixx)) -__header_filter_entries__(extra_headers) - </ItemGroup> - <ItemGroup> -__source_filter_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) -__source_filter_entries__(extra_sources) - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/sqlite/template/template-vc8.vcproj b/sqlite/template/template-vc8.vcproj deleted file mode 100644 index ef608ba..0000000 --- a/sqlite/template/template-vc8.vcproj +++ /dev/null @@ -1,354 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="__value__(name)" - ProjectGUID="{__uuid__()}" - RootNamespace="__value__(name)" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="$(SolutionDir)\..\libcommon\lib\common-d.lib odb-sqlite-d.lib odb-d.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="$(SolutionDir)\..\libcommon\lib\common.lib odb-sqlite.lib odb.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="$(SolutionDir)\..\libcommon\lib64\common-d.lib odb-sqlite-d.lib odb-d.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="$(SolutionDir)\..\libcommon\lib64\common.lib odb-sqlite.lib odb.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cxx" - UniqueIdentifier="{__uuid__()}" - > -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - </Filter> - <Filter - Name="Header Files" - Filter="h;hxx;ixx;txx" - UniqueIdentifier="{__uuid__()}" - > -__ifelse__(__value__(odb_options),,, -__file_entry_custom_build__( -test.hxx, -odb test.hxx, -odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1400 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) -__file_entry__(test-odb.hxx) -__file_entry__(test-odb.ixx)) -__file_entries__(extra_headers) - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/sqlite/template/template-vc9.vcproj b/sqlite/template/template-vc9.vcproj deleted file mode 100644 index 960f086..0000000 --- a/sqlite/template/template-vc9.vcproj +++ /dev/null @@ -1,361 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="__value__(name)" - ProjectGUID="{__uuid__()}" - RootNamespace="__value__(name)" - Keyword="Win32Proj" - TargetFrameworkVersion="196613" - > - <Platforms> - <Platform - Name="Win32" - /> - <Platform - Name="x64" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="$(SolutionDir)\..\libcommon\lib\common-d.lib odb-sqlite-d.lib odb-d.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="2" - EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="$(SolutionDir)\..\libcommon\lib\common.lib odb-sqlite.lib odb.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="0" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="$(SolutionDir)\..\libcommon\lib64\common-d.lib odb-sqlite-d.lib odb-d.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="2" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - TargetEnvironment="3" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/wd4068 /wd4355 /wd4800 /wd4290" - Optimization="2" - EnableIntrinsicFunctions="true" - AdditionalIncludeDirectories="$(SolutionDir)\..\libcommon" - PreprocessorDefinitions="WIN32;_CONSOLE;HAVE_CONFIG_VC_H" - RuntimeLibrary="2" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="$(SolutionDir)\..\libcommon\lib64\common.lib odb-sqlite.lib odb.lib" - OutputFile="$(OutDir)\driver.exe" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="17" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cxx" - UniqueIdentifier="{__uuid__()}" - > -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - </Filter> - <Filter - Name="Header Files" - Filter="h;hxx;ixx;txx" - UniqueIdentifier="{__uuid__()}" - > -__ifelse__(__value__(odb_options),,, -__file_entry_custom_build__( -test.hxx, -odb test.hxx, -odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) -__file_entry__(test-odb.hxx) -__file_entry__(test-odb.ixx)) -__file_entries__(extra_headers) - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/sqlite/template/test.hxx b/sqlite/template/test.hxx deleted file mode 100644 index 63e07d5..0000000 --- a/sqlite/template/test.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : sqlite/template/test.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST_HXX -#define TEST_HXX - -#include <odb/core.hxx> - -#pragma db object -struct object -{ - object (unsigned long id) - : id_ (id) - { - } - - object () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // TEST_HXX diff --git a/sqlite/template/test.std b/sqlite/template/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/template/test.std +++ /dev/null diff --git a/sqlite/test.bat b/sqlite/test.bat deleted file mode 100644 index ab29f82..0000000 --- a/sqlite/test.bat +++ /dev/null @@ -1,68 +0,0 @@ -@echo off -rem file : sqlite/test.bat -rem license : GNU GPL v2; see accompanying LICENSE file - -setlocal - -set "tests=__path__(dirs)" -set "confs=__path__(configurations)" -set "plats=__path__(platforms)" -set "curdir=%CD%" -set "topdir=%curdir%\.." -set "failed=" - -goto start - -rem -rem %1 - test directory -rem %2 - configuration -rem %3 - platform -rem -:run_test - cd %1 - - if "_%3_" == "_Win32_" ( - set "dir=%2" - ) else ( - set "dir=%3\%2" - ) - - if exist %dir%\driver.exe ( - echo %1\%3\%2 - call %topdir%\tester.bat sqlite %2 %3 - if errorlevel 1 ( - set "failed=%failed% %1\%3\%2" - ) - ) - - cd %curdir% -goto :eof - -:start - -for %%t in (%tests%) do ( - for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_test %%t %%c %%p - ) - ) -) - -if not "_%failed%_" == "__" goto error - -echo. -echo ALL TESTS PASSED -echo. -goto end - -:error -if not "_%failed%_" == "__" ( - echo. - for %%t in (%failed%) do echo FAILED: %%t - echo. -) -endlocal -exit /b 1 - -:end -endlocal diff --git a/sqlite/transaction/buildfile b/sqlite/transaction/buildfile new file mode 100644 index 0000000..e29092d --- /dev/null +++ b/sqlite/transaction/buildfile @@ -0,0 +1,30 @@ +# file : sqlite/transaction/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-sqlite%lib{odb-sqlite} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix sqlitex_transaction_ \ + --generate-schema \ + --default-database common + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/transaction/driver.cxx b/sqlite/transaction/driver.cxx index 8eb8f2c..80a0804 100644 --- a/sqlite/transaction/driver.cxx +++ b/sqlite/transaction/driver.cxx @@ -4,18 +4,20 @@ // Test esoteric SQLite transaction semantics aspects. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/sqlite/database.hxx> #include <odb/sqlite/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; namespace sqlite = odb::sqlite; using namespace sqlite; @@ -25,7 +27,7 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); // In SQLite, when a commit fails because of the deferred foreign // key constraint violation, the transaction is not automatically diff --git a/sqlite/transaction/makefile b/sqlite/transaction/makefile deleted file mode 100644 index 14e4ca0..0000000 --- a/sqlite/transaction/makefile +++ /dev/null @@ -1,107 +0,0 @@ -# file : sqlite/transaction/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database sqlite --default-database \ -common --generate-schema --table-prefix sqlitex_transaction_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(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)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/transaction/test.std b/sqlite/transaction/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/transaction/test.std +++ /dev/null diff --git a/sqlite/transaction/testscript b/sqlite/transaction/testscript new file mode 100644 index 0000000..c3388cb --- /dev/null +++ b/sqlite/transaction/testscript @@ -0,0 +1,9 @@ +# file : sqlite/transaction/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../sqlite.testscript + +: basics +: +$* diff --git a/sqlite/truncation/buildfile b/sqlite/truncation/buildfile new file mode 100644 index 0000000..9a014e6 --- /dev/null +++ b/sqlite/truncation/buildfile @@ -0,0 +1,31 @@ +# file : sqlite/truncation/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-sqlite%lib{odb-sqlite} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix sqlitex_truncation_ \ + --generate-schema \ + --default-database common \ + --generate-query + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/truncation/driver.cxx b/sqlite/truncation/driver.cxx index 5ab6c29..a2f6d66 100644 --- a/sqlite/truncation/driver.cxx +++ b/sqlite/truncation/driver.cxx @@ -4,18 +4,20 @@ // Test insufficient buffer/truncation handling. // -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/sqlite/database.hxx> #include <odb/sqlite/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; namespace sqlite = odb::sqlite; using namespace sqlite; @@ -33,7 +35,7 @@ main (int argc, char* argv[]) // Test basic operations. // { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); // Run persist/load so that the initial bindings are established // (version == 0). @@ -71,7 +73,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object2> o (db->load<object2> (3)); + unique_ptr<object2> o (db->load<object2> (3)); assert (o->str_ == long_str); t.commit (); } @@ -89,7 +91,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object2> o (db->load<object2> (3)); + unique_ptr<object2> o (db->load<object2> (3)); assert (o->str_ == longer_str); t.commit (); } @@ -98,7 +100,7 @@ main (int argc, char* argv[]) // Test query. // { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); typedef sqlite::query<object1> query; typedef odb::result<object1> result; diff --git a/sqlite/truncation/makefile b/sqlite/truncation/makefile deleted file mode 100644 index 4e7e0e3..0000000 --- a/sqlite/truncation/makefile +++ /dev/null @@ -1,107 +0,0 @@ -# file : sqlite/truncation/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database sqlite --default-database \ -common --generate-schema --generate-query --table-prefix sqlitex_truncation_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(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)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/truncation/test.std b/sqlite/truncation/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/truncation/test.std +++ /dev/null diff --git a/sqlite/truncation/testscript b/sqlite/truncation/testscript new file mode 100644 index 0000000..97e04f7 --- /dev/null +++ b/sqlite/truncation/testscript @@ -0,0 +1,9 @@ +# file : sqlite/truncation/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../sqlite.testscript + +: basics +: +$* diff --git a/sqlite/types/buildfile b/sqlite/types/buildfile new file mode 100644 index 0000000..1bf719d --- /dev/null +++ b/sqlite/types/buildfile @@ -0,0 +1,32 @@ +# file : sqlite/types/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($sqlite && !$multi || $build.meta_operation == 'dist') \ +"sqlite should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-sqlite%lib{odb-sqlite} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix sqlitex_types_ \ + --generate-schema \ + --default-database common \ + --generate-query \ + --cxx-prologue '#include "traits.hxx"' + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/sqlite/types/driver.cxx b/sqlite/types/driver.cxx index 8f25330..b444d94 100644 --- a/sqlite/types/driver.cxx +++ b/sqlite/types/driver.cxx @@ -5,18 +5,20 @@ // #include <limits> // std::numeric_limits -#include <memory> // std::auto_ptr -#include <cassert> +#include <memory> // std::unique_ptr #include <iostream> #include <odb/sqlite/database.hxx> #include <odb/sqlite/transaction.hxx> -#include <common/common.hxx> +#include <libcommon/common.hxx> #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include <cassert> + using namespace std; namespace sqlite = odb::sqlite; using namespace sqlite; @@ -26,7 +28,7 @@ main (int argc, char* argv[]) { try { - auto_ptr<database> db (create_specific_database<database> (argc, argv)); + unique_ptr<database> db (create_specific_database<database> (argc, argv)); object o (1); @@ -51,7 +53,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<object> o1 (db->load<object> (1)); + unique_ptr<object> o1 (db->load<object> (1)); t.commit (); assert (o == *o1); @@ -92,9 +94,9 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr<char_array> p1 (db->load<char_array> (1)); - auto_ptr<char_array> p2 (db->load<char_array> (2)); - auto_ptr<char_array> p3 (db->load<char_array> (3)); + unique_ptr<char_array> p1 (db->load<char_array> (1)); + unique_ptr<char_array> p2 (db->load<char_array> (2)); + unique_ptr<char_array> p3 (db->load<char_array> (3)); t.commit (); assert (o1 == *p1); diff --git a/sqlite/types/makefile b/sqlite/types/makefile deleted file mode 100644 index f3810b2..0000000 --- a/sqlite/types/makefile +++ /dev/null @@ -1,109 +0,0 @@ -# file : sqlite/types/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database sqlite --default-database \ -common --generate-schema --generate-query --cxx-prologue \ -'\#include "traits.hxx"' --table-prefix sqlitex_types_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): export extra_headers := traits.hxx -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/sqlite/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(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)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/sqlite/types/test.hxx b/sqlite/types/test.hxx index f642738..fe0b274 100644 --- a/sqlite/types/test.hxx +++ b/sqlite/types/test.hxx @@ -7,7 +7,7 @@ #include <set> #include <string> #include <vector> -#include <memory> // std::auto_ptr +#include <memory> // std::unique_ptr #include <cstring> // std::memcpy, std::str[n]cmp, std::strlen #ifdef _WIN32 @@ -16,7 +16,7 @@ #include <odb/core.hxx> -typedef std::auto_ptr<std::string> string_ptr; +typedef std::unique_ptr<std::string> string_ptr; #pragma db object struct object diff --git a/sqlite/types/test.std b/sqlite/types/test.std deleted file mode 100644 index e69de29..0000000 --- a/sqlite/types/test.std +++ /dev/null diff --git a/sqlite/types/testscript b/sqlite/types/testscript new file mode 100644 index 0000000..5e50d32 --- /dev/null +++ b/sqlite/types/testscript @@ -0,0 +1,9 @@ +# file : sqlite/types/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../sqlite.testscript + +: basics +: +$* |