summaryrefslogtreecommitdiff
path: root/xsd-examples/build
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-12-18 18:48:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-01-13 22:32:43 +0300
commit2615896faa646e5830abf2c269150e1165c66515 (patch)
tree7d95978ec0a83094c9462ed4e1f59d42f4ff8ddb /xsd-examples/build
parent7420f85ea19b0562ffdd8123442f32bc8bac1267 (diff)
Switch to build2
Diffstat (limited to 'xsd-examples/build')
-rw-r--r--xsd-examples/build/.gitignore3
-rw-r--r--xsd-examples/build/bootstrap.build9
-rw-r--r--xsd-examples/build/root.build56
3 files changed, 68 insertions, 0 deletions
diff --git a/xsd-examples/build/.gitignore b/xsd-examples/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/xsd-examples/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/xsd-examples/build/bootstrap.build b/xsd-examples/build/bootstrap.build
new file mode 100644
index 0000000..d98c460
--- /dev/null
+++ b/xsd-examples/build/bootstrap.build
@@ -0,0 +1,9 @@
+# file : build/bootstrap.build
+# license : not copyrighted - public domain
+
+project = xsd-examples
+
+using version
+using config
+using dist
+using test
diff --git a/xsd-examples/build/root.build b/xsd-examples/build/root.build
new file mode 100644
index 0000000..08f1170
--- /dev/null
+++ b/xsd-examples/build/root.build
@@ -0,0 +1,56 @@
+# file : build/root.build
+# license : not copyrighted - public domain
+
+define xsd: file
+xsd{*}: extension = xsd
+
+define xml: file
+xml{*}: extension = xml
+
+define map: file
+map{*}: extension = map
+
+cxx.std = latest
+
+using cxx
+
+hxx{*}: extension = hxx
+ixx{*}: extension = ixx
+txx{*}: extension = txx
+cxx{*}: extension = cxx
+
+if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800
+
+# Setup the xsd that we are using.
+#
+import xsd = xsd%exe{xsd}
+
+# Every exe{} in this project is by default a test.
+#
+exe{*}: test = true
+
+# Specify the test target for cross-testing.
+#
+test.target = $cxx.target
+
+# @@ Calculate the xsd's --std option based on the effective C++ standard
+# version.
+#
+xsd_cxx_std = --std c++11
+
+# @@ Optionally define the XSD_CXX11 macro based on the effective C++ standard
+# version, so that the source files that include libxsd headers directly are
+# compiled properly.
+#
+# Note that we could probably invent some configuration header which does
+# that based on the pre-defined compiler macros and which can be included
+# by the mentioned source files. However, it feels better to do it in sync
+# with the xsd_cxx_std variable assignment, to make sure that these source
+# files and the potentially present auto-generated files have this macro
+# (un)defined equally.
+#
+cxx.poptions =+ -DXSD_CXX11