aboutsummaryrefslogtreecommitdiff
path: root/tests/parser
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-04-29 08:29:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-04-29 08:29:49 +0200
commit871082dc018815261b6ec75a8e4933505389ffae (patch)
tree6b92641afc8dbbf234fa5b46569ed4335cb4204b /tests/parser
parenteb95d50569946def5e55c73445c1d85f603e8536 (diff)
Support for autotools and VC++ 9, 10, 11 build systems
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/driver.cxx22
-rw-r--r--tests/parser/makefile25
2 files changed, 34 insertions, 13 deletions
diff --git a/tests/parser/driver.cxx b/tests/parser/driver.cxx
index e949ad0..bdad9bf 100644
--- a/tests/parser/driver.cxx
+++ b/tests/parser/driver.cxx
@@ -2,6 +2,10 @@
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
// license : MIT; see accompanying LICENSE file
+#ifdef NDEBUG
+# error tests require enabled assert(); un-define the NDEBUG macro
+#endif
+
#include <string>
#include <cassert>
#include <iostream>
@@ -28,7 +32,7 @@ main ()
p.next ();
assert (false);
}
- catch (const xml::exception& e)
+ catch (const xml::exception&)
{
// cerr << e.what () << endl;
}
@@ -43,7 +47,7 @@ main ()
p.next ();
assert (false);
}
- catch (const ios_base::failure& e)
+ catch (const ios_base::failure&)
{
}
@@ -63,7 +67,7 @@ main ()
p.next_expect (parser::end_element);
assert (false);
}
- catch (const xml::exception& e)
+ catch (const xml::exception&)
{
// cerr << e.what () << endl;
}
@@ -75,7 +79,7 @@ main ()
p.next_expect (parser::start_element, "root1");
assert (false);
}
- catch (const xml::exception& e)
+ catch (const xml::exception&)
{
// cerr << e.what () << endl;
}
@@ -127,7 +131,7 @@ main ()
p.next_expect (parser::end_element);
assert (false);
}
- catch (const xml::exception& e)
+ catch (const xml::exception&)
{
// cerr << e.what () << endl;
}
@@ -140,7 +144,7 @@ main ()
p.attribute<int> ("a");
assert (false);
}
- catch (const xml::exception& e)
+ catch (const xml::exception&)
{
// cerr << e.what () << endl;
}
@@ -220,7 +224,7 @@ main ()
p.next ();
assert (false);
}
- catch (const xml::exception& e)
+ catch (const xml::exception&)
{
// cerr << e.what () << endl;
}
@@ -249,7 +253,7 @@ main ()
p.next ();
assert (false);
}
- catch (const xml::exception& e)
+ catch (const xml::exception&)
{
// cerr << e.what () << endl;
}
@@ -302,7 +306,7 @@ main ()
p.next ();
assert (false);
}
- catch (const xml::exception& e)
+ catch (const xml::exception&)
{
// cerr << e.what () << endl;
}
diff --git a/tests/parser/makefile b/tests/parser/makefile
index 965266e..8b97633 100644
--- a/tests/parser/makefile
+++ b/tests/parser/makefile
@@ -6,8 +6,6 @@ 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)
@@ -16,6 +14,7 @@ studxml.l.cpp-options := $(out_root)/xml/studxml.l.cpp-options
driver := $(out_base)/driver
test := $(out_base)/.test
+dist := $(out_base)/.dist
clean := $(out_base)/.clean
# Build.
@@ -23,14 +22,26 @@ clean := $(out_base)/.clean
$(driver): $(cxx_obj) $(studxml.l)
$(cxx_obj) $(cxx_od): $(studxml.l.cpp-options)
-
$(call include-dep,$(cxx_od))
-
# Alias for default target.
#
$(out_base)/: $(driver)
+# Dist
+#
+$(dist): name := $(subst $(src_root)/tests/,,$(src_base))
+$(dist): sources := $(cxx_tun)
+$(dist): export extra_dist := $(name)-vc9.vcproj \
+$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \
+$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters
+$(dist):
+ $(call dist-data,$(sources))
+ $(call meta-automake,../template/Makefile.am)
+ $(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)
+
# Test.
#
@@ -60,6 +71,12 @@ endif
# How to.
#
+$(call include,$(bld_root)/dist.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/automake.make)
+
$(call include,$(bld_root)/cxx/o-e.make)
$(call include,$(bld_root)/cxx/cxx-o.make)
$(call include,$(bld_root)/cxx/cxx-d.make)